all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestions for improvements to the *Completions* buffer
Date: Sat, 18 Dec 2021 19:40:30 +0200	[thread overview]
Message-ID: <86pmptssyh.fsf@mail.linkov.net> (raw)
In-Reply-To: <87czlv1nes.fsf@posteo.net> (Philip Kaludercic's message of "Fri,  17 Dec 2021 11:27:55 +0000")

> diff --git a/lisp/simple.el b/lisp/simple.el
> index a55df604c1..1521c325dc 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -8967,7 +8967,8 @@ completion-quit
>  (defun completion-kill-buffer ()
>    "Close the completion buffer and return to the minibuffer."
>    (interactive)
> -  (kill-buffer "*Completions*")
> +  (let ((win (get-buffer-window "*Completions*")))
> +    (when win (quit-window t win)))
>    (switch-to-minibuffer))

After fixing bug#52491, no more commands using switch-to-minibuffer
would be needed, so `q' can remain round to `quit-window', thus
doing what `delete-window' is customized to do.

>> Like currently `ESC ESC ESC' can close the completion window
>> by the special command `delete-completion-window', then the same
>> command could be bound to `[remap keyboard-quit]' as well.
>
> Sure, but what noticeable difference does this make?  It seems to me
> that quitting or killing the completion buffer doesn't amount to much of
> a difference, as *Completion* is rarely selected manually.
>
> The only case I can think of where the difference could matter, is when
> *Completion* is so large that you need to kill it.  But considering that
> even with "C-h o TAB" the difference appears to be indistinguishable.
> Quitting a window and requesting the came completion doesn't even reuse
> the existing buffer.

I see no difference, but maybe someone might want to use different commands
for quit-window: with and without kill-buffer (this will require a new command
`quit-window-kill-buffer').

> Seeing as <left> and <right> are bound to previous-completion and
> next-completion, maybe <up> and <down> could be used for
> completion/minibuffer switching?

Both pairs <left>/<right> and <up>/<down> are useful in multi-column
completions buffer.

> Or to take inspiration from Protesilaos's MCT package, that switches
> back to the minibuffer once next-completion and previous-completion
> reaches the end/beginning of the buffer, without quitting the window.
> With next-completion bound to TAB while TAB also jumps back to the
> completion buffer, it would behave to just by cycling.

This means no wrapping?  Or maybe wrapping through the minibuffer?



      parent reply	other threads:[~2021-12-18 17:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 17:22 Suggestions for improvements to the *Completions* buffer Philip Kaludercic
2021-12-09 17:49 ` [External] : " Drew Adams
2021-12-09 18:05   ` Philip Kaludercic
2021-12-09 19:21     ` Stefan Monnier
2021-12-09 18:27 ` Manuel Uberti
2021-12-09 19:49 ` Juri Linkov
2021-12-09 20:07   ` Philip Kaludercic
2021-12-09 20:21     ` Juri Linkov
2021-12-13 19:16       ` Philip Kaludercic
2021-12-09 21:16     ` Stefan Kangas
2021-12-13 19:13       ` Philip Kaludercic
2021-12-13 21:36 ` Philip Kaludercic
2021-12-14 21:13   ` Juri Linkov
2021-12-17 11:27     ` Philip Kaludercic
2021-12-17 15:00       ` Philip Kaludercic
2021-12-18 12:22       ` Philip Kaludercic
2021-12-18 12:31         ` Po Lu
2021-12-18 13:39           ` Philip Kaludercic
2021-12-20  1:13             ` Po Lu
2021-12-18 17:41         ` Juri Linkov
2021-12-19 14:55           ` Philip Kaludercic
2021-12-19 17:18             ` Juri Linkov
2021-12-19 23:58               ` Philip Kaludercic
2021-12-20  9:03                 ` Philip Kaludercic
2021-12-21 19:02                 ` Juri Linkov
2021-12-21 21:32                   ` Philip Kaludercic
2021-12-22  7:54                     ` Daniel Semyonov
2021-12-22  9:04                       ` Juri Linkov
2021-12-22  9:56                         ` Daniel Semyonov
2021-12-22 17:42                           ` Juri Linkov
2021-12-22 12:27                     ` Eli Zaretskii
2021-12-18 17:40       ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86pmptssyh.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.