To create a macro:
C-x (
Once in macro recording mode, enter a series of commands. When finished:
C-x )
To name the most recently recorded macro:
M-x name-last-kbd-macro
Enter a name for the macro. The name will now be accessible as M-x <name>.
To generate macro elisp suitable for reload, run M-x insert-kbd-macro and enter the name of a defined macro. Paste the resulting code into ~/.emacs.
configurationdot-emacseditorsemacskeystrokesmacros
By default, the emacs buffer list appears in a vertical split when you type C-x C-b (or run M-x list-buffers). I use a widescreen monitor which means a horizontal split would be much nicer. Since I couldn't find a Customize setting to change this behavior, I wrote this keyboard macro in my ~/.emacs which does the trick:
(fset 'my-list-buffers [?\C-x ?1 ?\C-x ?3 ?\M-x ?l ?i ?s ?t ?- ?b ?u ?f ?f ?e ?r ?s return ?\C-x ?o]) (global-set-key "\C-x\C-b" 'my-list-buffers)
bufferseditingemacsmacros