emacs-devel
[Top][All Lists]
Advanced

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

Re: Key binding popup interface


From: Stefan Monnier
Subject: Re: Key binding popup interface
Date: Tue, 12 Dec 2017 16:18:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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.  ]

> The idea is to press a binding, and then a contextual menu pops up with a
> list of next valid key that can be pressed (and this does not necessarily
> list *all* the bound keys.. that's one place where it's different from
> another package: which-key).

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, ...".

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.


        Stefan




reply via email to

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