Re: On keybindings and the slow erosion of help's utility

Eli Zaretskii <[email protected]> Sun, 02 Aug 2026 07:29:13 +0300
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> From: Ihor Radchenko <[email protected]>
> Cc: Eli Zaretskii <[email protected]>, [email protected], [email protected]
> Date: Sat, 01 Aug 2026 16:17:09 +0000
> 
> What I suggest is allowing the binding to be a new element that will
> determine what should be done by running Elisp code.
> Now, on M-w, that Elisp code will run and return nil, a command, a
> keymap, or keymap variable symbol - the same elements as allowed in the
> keymaps already.
> 
> This is the low-level structure.
> 
> Further, I propose to have a helper macro keymap-dynamic-bind that will
> allow defining these new dynamic bindings in useful ways.
> I propose that each dynamic binding can be something akin abnormal hook,
> where users can define a set of conditions that will run one or another
> command depending on the current context. The elements of this abnormal
> hook are delegated the job of deciding the dynamic binding - nil, a
> command, a keymap, or keymap variable.

How is this different from binding to a command which does all this
dynamic stuff, including running a hook if needed?