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: Sun, 07 Apr 2024 20:16:03 +0300 Organization: LINKOV.NET Message-ID: <86a5m59jqk.fsf@mail.linkov.net> References: <864jpsrgaz.fsf@mail.linkov.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="28559"; 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 Sun Apr 07 19:18:22 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 1rtW9t-0007EF-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Apr 2024 19:18:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtW9X-0000eQ-F0; Sun, 07 Apr 2024 13:17:59 -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 1rtW9U-0000eA-9v for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 13:17:56 -0400 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 1rtW9T-0003X6-Pc for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 13:17:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtW9a-0000I0-LF for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 13:18: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: Sun, 07 Apr 2024 17:18: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.17125102651037 (code B ref 62700); Sun, 07 Apr 2024 17:18:02 +0000 Original-Received: (at 62700) by debbugs.gnu.org; 7 Apr 2024 17:17:45 +0000 Original-Received: from localhost ([127.0.0.1]:44401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtW9I-0000Gf-VO for submit@debbugs.gnu.org; Sun, 07 Apr 2024 13:17:45 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:57671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtW9F-0000Fo-Vs for 62700@debbugs.gnu.org; Sun, 07 Apr 2024 13:17:42 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id EEC7F60003; Sun, 7 Apr 2024 17:17:28 +0000 (UTC) In-Reply-To: (Spencer Baugh's message of "Sun, 07 Apr 2024 12:12:26 -0400") 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:282883 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-. > > BTW: do you know if anyone has done any more work on resolving this > FIXME? I'm not aware of anyone working on this FIXME. The last complete patch was posted by Daniel Mendler to https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00412.html and to bug#47711. > Maybe there's an open bug for it, or some work I could start > from? There are two open bug reports: bug#47711 and bug#48356. > I'm running into bug#62700 again for completion tables which use > boundaries but aren't file completion. The heuristic I added only works > for file completion, but I'm working on a completion table which uses > boundaries for completing dotted.field.paths in OCaml, and so completing > at dotted.fie|.paths inserts "dotted.field." and deletes the "paths" > part. To fix this, I think I should just fix this FIXME once and for > all (and then we can delete the heuristic I added) The patch created by Daniel Mendler should resolve this FIXME, maybe after some minor updates.