From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Suggestions for improvements to the *Completions* buffer Date: Sat, 18 Dec 2021 19:40:30 +0200 Organization: LINKOV.NET Message-ID: <86pmptssyh.fsf@mail.linkov.net> References: <87a6h9g0c0.fsf@posteo.net> <87zgp45gri.fsf@posteo.net> <865yrr300t.fsf@mail.linkov.net> <87czlv1nes.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22236"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 18 18:59:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mydzV-0005aT-G2 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Dec 2021 18:59:29 +0100 Original-Received: from localhost ([::1]:40890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mydzU-0001dg-JY for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Dec 2021 12:59:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mydxu-0008MC-2k for emacs-devel@gnu.org; Sat, 18 Dec 2021 12:57:50 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:50557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mydxr-00051s-Up for emacs-devel@gnu.org; Sat, 18 Dec 2021 12:57:49 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 290CE240004; Sat, 18 Dec 2021 17:57:44 +0000 (UTC) In-Reply-To: <87czlv1nes.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 17 Dec 2021 11:27:55 +0000") Received-SPF: pass client-ip=217.70.183.193; envelope-from=juri@linkov.net; helo=relay1-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282334 Archived-At: > 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 and are bound to previous-completion and > next-completion, maybe and could be used for > completion/minibuffer switching? Both pairs / and / 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?