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.bugs Subject: bug#68801: 30.0.50; minibuffer-visible-completions=t makes RET in completion-in-region a no-op with nothing selected Date: Sun, 11 Feb 2024 19:59:47 +0200 Organization: LINKOV.NET Message-ID: <867cjax4oc.fsf@mail.linkov.net> References: <86y1c6688u.fsf@mail.linkov.net> <86plxiq6hv.fsf@mail.linkov.net> <867cjejfan.fsf@mail.linkov.net> <871q9k6vfo.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38269"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68801@debbugs.gnu.org, Spencer Baugh To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 19:02:00 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rZE9Q-0009kM-J2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 19:02:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZE9I-00018o-Fk; Sun, 11 Feb 2024 13:01:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZE9D-00010y-6O for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 13:01:48 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZE9C-0003RU-Dj for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 13:01:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZE9R-0002EN-Mz for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 13:02:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Feb 2024 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68801 X-GNU-PR-Package: emacs Original-Received: via spool by 68801-submit@debbugs.gnu.org id=B68801.17076745018515 (code B ref 68801); Sun, 11 Feb 2024 18:02:01 +0000 Original-Received: (at 68801) by debbugs.gnu.org; 11 Feb 2024 18:01:41 +0000 Original-Received: from localhost ([127.0.0.1]:35983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZE97-0002DG-13 for submit@debbugs.gnu.org; Sun, 11 Feb 2024 13:01:41 -0500 Original-Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:43949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZE94-0002Cl-Ev for 68801@debbugs.gnu.org; Sun, 11 Feb 2024 13:01:39 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2676320002; Sun, 11 Feb 2024 18:01:13 +0000 (UTC) In-Reply-To: <871q9k6vfo.fsf@catern.com> (sbaugh@catern.com's message of "Sat, 10 Feb 2024 18:14:26 +0000 (UTC)") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279863 Archived-At: > The annoying thing is that this breaks the enhancement to > completion-show-help I recently made. When a completion is not > selected, RET isn't bound, so the help shows "Click or type M-x > minibuffer-choose-completion-or-exit on a completion to select it." > > I'm not sure the right way to fix that. Selectively binding RET based > on whether a completion is selected feels sketchy anyway, it may confuse > users because e.g. C-h c RET won't work. > > Maybe instead we should always bind RET, but if no completion is > selected, we run the command that RET was bound to before > completion-in-region-mode started? Then 'minibuffer-choose-completion-or-exit' could be more smart to run whatever command was bound to RET initially, instead of using the hard-coded 'minibuffer-complete-and-exit'. But this might require juggling with keymaps. > Alternatively... as a completely separate point, I'd like > completion-in-region to select the first completion candidate by > default. I think that's useful in some cases and, for > completion-in-region, doesn't have any negatives: we couldn't do it in > the minibuffer because it would interfere with accepting the default, > but there are no defaults in completion-in-region. > > If we make c-i-r select the first completion candidate by default, that > would both: > > - Make the completion-show-help help render correctly with the "only > override RET when there's a selected completion" patch. > > - Partially mitigate the RET issue all on its own Calling 'first-completion' makes sense even for the minibuffer, at least optionally.