Emacs Lisp question

Palit, Nilanjan nilanjan.palit-ral2JQCrhuEAvxtiuMwx3w at public.gmane.org
Thu Jan 13 17:04:37 EST 2011


> From: discuss-bounces-mNDKBlG2WHs at public.gmane.org [mailto:discuss-bounces-mNDKBlG2WHs at public.gmane.org] On Behalf Of Jerry Feldman
> Sent: Thursday, January 13, 2011 4:15 PM

> > On Thu, Jan 13, 2011 at 4:06 PM, Richard Pieri <richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> >> On Jan 13, 2011, at 3:01 PM, Palit, Nilanjan wrote:
> >>> (fset 'SetMacroDef1
> >>>   [8388728 115 101 116 32 118 97 ...list of keystrokes])
> >> *twitch*
> >>
> >> --Rich P.
> > Imagine how the vi users of the list feel!
> >
> > As a coworker of mine used to announce, "emacs is God's editor"! QED

The macro definitions are generated by Emacs itself. You define the kbd macro (as if you're executing the command) in the editor and name it. Then go to your .emacs file and then do insert-last-named-macro and emacs inserts the above text with the full syntax (as quoted). I don't need to figure out the exact syntax or the key codes or anything else. The user can then optionally define a key binding to the macro if desired (as I did). Doesn't seem like a big deal/effort for a one time task that significantly improves productivity.

-Nilanjan




More information about the Discuss mailing list