emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggestions for improvements to the *Completions* buffer


From: Juri Linkov
Subject: Re: Suggestions for improvements to the *Completions* buffer
Date: Thu, 09 Dec 2021 21:49:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> I'd like to suggest a few modifications to the default behaviour of
> the *Completions* buffer.  These are mostly conservative extensions of
> the current defaults.

Thanks, all your patches is a nice improvement.  I have a question only
about the last patch.

> When exiting the *Completions* buffer, C-g and q seem not to send the
> user back to minibuffer.

This was just a plain bug.

> +(defun completion-quit ()
> +  "Close the completion buffer and return to the minibuffer."
> +  (interactive)
> +  (quit-window)
> +  (switch-to-minibuffer))
> +
> +(defun completion-kill-buffer ()
> +  "Close the completion buffer and return to the minibuffer."
> +  (interactive)
> +  (kill-buffer "*Completions*")
> +  (switch-to-minibuffer))
> @@ -8970,10 +8982,12 @@ completion-list-mode-map
> +    (define-key map "z" #'completion-kill-buffer)
> +    (define-key map [remap keyboard-quit] #'completion-quit)
> +    (define-key map [remap quit-window] #'switch-to-minibuffer)

So typing C-g in the *Completions* buffer will be the same as
typing C-g in the minibuffer?  This would provide more consistency.

> In the *Completions*, self-insert-command is not bound so that "q", "n",
> "p", "z", ... can be used.  This patch would add "s" (for
> isearch-forward) and "S" (for isearch-forward-regexp) to the default
> bunch.  This is my most recent change, that I am least certain about.
> If I played around with it for a bit longer, maybe this could also be
> extended to an interactive narrowing along the lines of icomplete.

I guess it's too late to allow all self-inserting keys in the *Completions*
buffer to be used either to add characters to the search string,
or to narrow completions interactively as if they were typed in the minibuffer,
because "q", "n", "p", "z" are already bound to other commands?



reply via email to

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