|
From: | Juri Linkov |
Subject: | Re: "whether the global keymap C-x 4 will be replaced by a command," |
Date: | Thu, 16 Jul 2020 02:54:30 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Prefix commands give structure to the space of key-bindings. > E.g. the new `C-x 4 4` prefix command makes almost all the special > `foo-other-window` commands (and their key bindings) redundant. It seems one of remaining major problems is how to make the most frequently used key sequences for other-window commands shorter, e.g. how to reduce `C-x 4 4 C-x C-f` to just `C-x 4 C-f`. This suggests there is a need for a new general function that could be used in a prefix command. Such function should prepare the environment for the next command to run it with modified variable bindings. Currently I have no idea for implementation, but maybe it's possible for a such function (and the prefix command where it's used) to return a closure in which the next command should be invoked? Then it could bind `overriding-terminal-local-map` (instead of using `set-transient-map`) and also bind `display-buffer-overriding-action` (instead of using `display-buffer-override-next-command`). This will also solve the problem of setting `default-directory` for `C-x p p` (project-switch-project). As explained in https://debbugs.gnu.org/41890#196 currently it's not possible to bind the value of `default-directory` for the next command, but with a closure the variable binding will have the effect during the next command.
[Prev in Thread] | Current Thread | [Next in Thread] |