|
From: | Juri Linkov |
Subject: | Re: feature/completions-highlight-modifications e3c5b99 3/6: Add completions-highlight-mode initial implementation. |
Date: | Sun, 22 Nov 2020 22:03:05 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> The real issue with that is not setting, but reseting. Because > completions-list-map uses: > > 1. \e\e\e delete-completion-window > 2. q quit-window > 3. z kill-current-buffer > > to exit. In principle quit-window-hook works for 2. But for 1 we need > an advise and rebind q and 3 is bind to z. so I am not clear what's the > best approach or the consequences of changing > them. But my proposal will be then make: > q and z: self-insert (as they will call quit-window in the hook any way). I see no problem in treating q and z as self-inserting characters in this special mode. > And rebind > C-g: to kill-current-buffer. (I don't really know the difference between > all them) Or maybe better to bind C-g to abort-recursive-edit. > The hook for self-insert is trivial. But it won't cover commands like > delete-backward-char, backward-kill-word and so on. So it seems more keys need to be bound in the completions buffer to redirect their effect to the minibuffer. > The trick there may be to throw the read-only error and call 1, 2 or > 3... to go to the minibuffer when any command tries to modify > "Completions* and try to execute there. > > But I don't know if it is possible to do that for a whole buffer or a > map in a clean way and locally to a window/buffer only. Is it? There keybindings could be added by a new mode enabled in the completions buffer.
[Prev in Thread] | Current Thread | [Next in Thread] |