emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key binding popup interface


From: Kaushal Modi
Subject: Re: Key binding popup interface
Date: Tue, 12 Dec 2017 21:28:01 +0000

On Tue, Dec 12, 2017 at 4:19 PM Stefan Monnier <address@hidden> wrote:
> For instance, I have a hydra to insert different Org blocks in org-mode,
> and looks like this:
> [image: image.png]

[ Hmm... Gnus here doesn't seem to provide any way for me to see
  this image.  ]

Sorry about that.. don't those images show up as attachments? They show up on the mailing list page fine. Here are 2 messages where I pasted images in this thread:

- http://lists.gnu.org/r/emacs-devel/2017-12/msg00392.html
- http://lists.gnu.org/r/emacs-devel/2017-12/msg00395.html

This sounds a bit like the primitive "hierarkey" feature which I used in
PCL-CVS.  Basically there I defined a sub-keymap bound to `d` with
bindings like:

       (?= . ("diff" . cvs-mode-diff))
       (?2 . ("other" . cvs-mode-diff-other))
       (?d . ("diff"  . cvs-mode-diff))
       (?v . ("vendor"  . cvs-mode-diff))
       ...

so after hitting `d` Emacs shows in the each area something like
"Diff: vendor, diff, = = diff, 2 = other, ...".

I had not heard of that!

This is a very old feature implemented in the C code (src/keyboard.c)
and very little used.

It would be good to replace it with a more powerful feature implemented
in Elisp and used more widely.

That's a +1 for hydra? :)

You can check out more examples of hydra on its Wiki[1]. I have quite a few hydra examples in my emacs config too[2].

[1]: https://github.com/abo-abo/hydra/wiki/Emacs
[2]: https://github.com/kaushalmodi/.emacs.d/search?l=Emacs+Lisp&q=defhydra
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]