From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh 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 14:58:42 -0400 Message-ID: References: <83r0swq39p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2800"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62700@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 20:59:14 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 1pkUpF-0000Yf-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 20:59:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkUp5-0007w5-DI; Thu, 06 Apr 2023 14:59:03 -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 1pkUp4-0007vw-4y for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 14:59:02 -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 1pkUp3-000220-Po for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 14:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkUp3-0006kU-Lv for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 14:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Apr 2023 18:59:01 +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.168080753225924 (code B ref 62700); Thu, 06 Apr 2023 18:59:01 +0000 Original-Received: (at 62700) by debbugs.gnu.org; 6 Apr 2023 18:58:52 +0000 Original-Received: from localhost ([127.0.0.1]:55164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkUot-0006k4-KI for submit@debbugs.gnu.org; Thu, 06 Apr 2023 14:58:52 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:47933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkUoq-0006jo-AH for 62700@debbugs.gnu.org; Thu, 06 Apr 2023 14:58:50 -0400 In-Reply-To: <83r0swq39p.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Apr 2023 21:22:42 +0300") 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:259348 Archived-At: Eli Zaretskii writes: >> Cc: Juri Linkov >> From: Spencer Baugh >> Date: Thu, 06 Apr 2023 13:56:35 -0400 >> >> 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. > > I think it's the intended behavior. In this case, it looks not > useful, because the string you typed before starting to use M- and > M- happens to be at the end of each completion candidate. But > this is not the only situation possible. Basically, completion always > modifies only the text before point, leaving what's after point > intact, so that the user could have after point stuff that completion > should ignore, and that eventually will be appended to the selected > candidate. Could you give an example of when this would be desirable? >> 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. > > Why did you need to move point to the beginning of what you typed to > begin with? Unless you explain that, I don't see how we can consider > this issue important enough to fix at all, let alone for Emacs 29. > >> If this is intentional for some reason, I think the behavior should >> definitely be changed before Emacs 29 is released. Moving point around >> in the minibuffer while completing is an important part of using the >> default completion-styles > > It is? why? "basic" and "emacs22" are default completion-styles, and they both treat text after point differently from text before point. For example, suppose I wanted to wanted to complete filenames starting with x and ending in .c. The way I would do this with the default completion-styles is enter "x.c", placing point just before ".", and hit TAB. (I could equivalently do x*.c and hit TAB, but that will move point to right after the "*" and run into this same issue!) Actually, * is another good example. If I input a * in my string to be completed (which is provided by partial-completion, a default completion-style), then when I hit TAB point is moved back to the site of the *. This makes * very hard to use at the same time as minibuffer-{previous,next}-completion, because of their behavior of not modifying the text after point.