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#62700: 29.0.60; minibuffer-{previous,next,choose}-completion behave unintuitively when point is not at end of buffer Date: Thu, 06 Apr 2023 21:55:48 +0300 Organization: LINKOV.NET Message-ID: <864jpsrgaz.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12739"; 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: 62700@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 21:01:10 2023 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 1pkUr7-000312-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 21:01:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkUr3-0008JJ-FY; Thu, 06 Apr 2023 15:01:05 -0400 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 1pkUr0-0008I4-VI for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 15:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkUr0-0002qA-Ga for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 15:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkUr0-0006p9-4J for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Apr 2023 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62700 X-GNU-PR-Package: emacs Original-Received: via spool by 62700-submit@debbugs.gnu.org id=B62700.168080762126173 (code B ref 62700); Thu, 06 Apr 2023 19:01:02 +0000 Original-Received: (at 62700) by debbugs.gnu.org; 6 Apr 2023 19:00:21 +0000 Original-Received: from localhost ([127.0.0.1]:55168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkUqL-0006o5-65 for submit@debbugs.gnu.org; Thu, 06 Apr 2023 15:00:21 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkUqJ-0006ns-KK for 62700@debbugs.gnu.org; Thu, 06 Apr 2023 15:00:20 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id BF5C324000B; Thu, 6 Apr 2023 19:00:11 +0000 (UTC) In-Reply-To: (Spencer Baugh's message of "Thu, 06 Apr 2023 13:56:35 -0400") 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:259349 Archived-At: > 6. C-h v -path > 7. C-a to move point to before -path > 8. to show completions of variables ending in -path > 9. Use M- and M- to switch between completions. Now as you > switch completions, they are inserted at point, *without* replacing the > text already in the buffer. So e.g. the minibuffer will contain > "load-path-path". > 10. Likewise, if you (setq minibuffer-completion-auto-choose nil), M-RET > inserts the completion string at point, without replacing the text in > the minibuffer, so you will get "load-path-path". > > I think this is basically just a bug. Hopefully we can fix this before > Emacs 29 is released, because this is the last thing which stops these > new commands from being a really great improvement to the Emacs > completion defaults. I agree that it would be nice to fix this in Emacs 29. But the problem is that this would require non-trivial changes. We need to apply a small part of the patch mentioned in bug#47711, bug#48356, bug#48841, bug#60313 and located at https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00412.html that implements the following FIXME item in 'completion-all-completions': ;; FIXME: We need to additionally return the info needed for the ;; second part of completion-base-position. When it will return from 'completion-all-completions' not only the start position of a completion, but also its end, then we could use this additional information for M- and M-.