Is there a (repeat-last-command) in Emacs?

Repeat functionality is provided by the repeat.el Emacs Lisp package, which is included with standard Emacs distributions. From repeat.el‘s documentation: This package defines a command that repeats the preceding command, whatever that was, including its arguments, whatever they were. This command is connected to the key C-x z. To repeat the previous command once, type … Read more

How to run multiple shells on Emacs

C-u M-x shell will do it. It will prompt for a name for the new shell, just hit return for the default (which will be something like *shell*<2>. Also works with eshell. Another trick, if you use eshell: just as M-x eshell takes you back to *eshell* (rather than starting a new eshell), if you … Read more

Emacs – Multiple columns one buffer

See follow-mode. Excerpt: Follow mode is a minor mode that makes two windows, both showing the same buffer, scroll as a single tall “virtual window.” To use Follow mode, go to a frame with just one window, split it into two side-by-side windows using C-x 3, and then type M-x follow-mode. From then on, you … Read more

Updating packages in Emacs

In order to automatically update the list of packages, only if there is no package list already, use the following: (when (not package-archive-contents) (package-refresh-contents)) In order to update all installed packages, type package-list-packages, which will take you to the *Packages* buffer (and also update the list of packages), and then type U x. package-refresh-contents unconditionally … Read more

Re-open *scratch* buffer in Emacs?

GNU Emacs default bindings: C-xb *scratch* RET or, more verbosely M-x switch-to-buffer *scratch* RET The *scratch* buffer is the buffer selected upon startup, and has the major mode Lisp Interaction. Note: the mode for the *scratch* buffer is controlled by the variable initial-major-mode. In general you can create as many “scratch” buffers as you want, … Read more

Set 4 Space Indent in Emacs in Text Mode

Short answer: The key point is to tell emacs to insert whatever you want when indenting, this is done by changing the indent-line-function. It is easier to change it to insert a tab and then change tabs into 4 spaces than change it to insert 4 spaces. The following configuration will solve your problem: (setq-default … Read more

Using Emacs as an IDE

You’ll have to be specific as to what you mean by “the rest”. Except for the object inspector (that I”m aware of), emacs does all the above quite easily: editor (obvious) compiler – just run M-x compile and enter your compile command. From there on, you can just M-x compile and use the default. Emacs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)