Few weeks ago I showed you a
handy way to run
might have noticed that it makes sense for many commands to be run in
a similar manner. Here’s a quick example - I often like to jump
between an Emacs Lisp source buffer and an
ielm (interactive Emacs
Lisp shell -
M-x ielm) buffer to try out stuff. I could reuse the
code I showed you for
ansi-term to create a similar command called
1 2 3 4 5 6 7 8 9
You might want to bind this to
C-c C-z (a-la SLIME):
I don’t know about you, but I hate code repetition. Having that in mind we can factor out the duplication like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Much better! We can now use
start-or-switch-to to build any number of similar commands!
visit-ielm are available in
Prelude(but with a
P.S. If you’d like some nice SLIME-like code navigation command in
emacs-lisp-mode you might check out
SLIME allows very convenient navigation to the symbol at point (using
M-.), and the ability to pop back to previous marks (using
This plugin provides similar navigation for Emacs Lisp, supporting navigation to the definitions of variables, functions, libraries and faces.
elisp-slime-nav provides a way to describe the symbol at
point, whatever its type. As with
functionality is bound both to
C-c C-d d and
C-c C-d C-d by default.
It’s pretty useful if you hack Emacs Lisp yourselves. If you don’t hack Emacs Lisp (yet) you probably can do without it.
elisp-slime-nav comes bundled with Prelude.