From: Juri Linkov <juri@linkov.net>
To: sbaugh@catern.com
Cc: 62700@debbugs.gnu.org, Spencer Baugh <sbaugh@janestreet.com>
Subject: bug#62700: 29.0.60; minibuffer-{previous,next,choose}-completion behave unintuitively when point is not at end of buffer
Date: Mon, 04 Sep 2023 09:51:04 +0300 [thread overview]
Message-ID: <86r0nexwh3.fsf@mail.linkov.net> (raw)
In-Reply-To: <87bkeird9k.fsf@catern.com> (sbaugh@catern.com's message of "Mon, 04 Sep 2023 00:30:16 +0000 (UTC)")
>>> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
>>> index 539206a19e4..d079dc0bcdf 100644
>>> --- a/lisp/minibuffer.el
>>> +++ b/lisp/minibuffer.el
>>> @@ -2395,7 +2395,11 @@ minibuffer-completion-help
>>> (prefix (unless (zerop base-size) (substring string 0 base-size)))
>>> (base-prefix (buffer-substring (minibuffer--completion-prompt-end)
>>> (+ start base-size)))
>>> - (base-suffix (buffer-substring (point) (point-max)))
>>> + (base-suffix
>>> + (if (eq (alist-get 'category (cdr md)) 'file)
>>> + (buffer-substring (save-excursion (or (search-forward "/" nil t) (point-max)))
>>> + (point-max))
>>> + ""))
>>
>> As was found in bug#64903, this change broke completion-in-region.
>> For example, with (setq completion-use-base-affixes t)
>> if there is some text in the current buffer after point,
>> then typing 'M-C-i' and selecting a candidate to insert to the buffer,
>> it replaces all the text after point with an empty string.
>>
>> Before this change, the suffix was set to the text after point,
>> and after inserting the selected candidate the suffix was
>> re-inserted to the same buffer.
>
> How can this be the cause of bug#64903? Wasn't that bug reproduced on
> Emacs 28? This change only went in to 29.
bug#64903 is a related but completely separate case.
The patch above went in to master, so in-buffer completion
with non-nil completion-use-base-affixes is broken only
in master, but fortunately not broken in emacs-29.
next prev parent reply other threads:[~2023-09-04 6:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b921ea5c-71a2-4e8f-b1cf-dd26831f8104@email.android.com>
2023-04-10 18:20 ` bug#62700: 29.0.60; minibuffer-{previous,next,choose}-completion behave unintuitively when point is not at end of buffer Juri Linkov
2023-04-20 16:52 ` Spencer Baugh
2023-04-20 18:18 ` Juri Linkov
2023-04-20 18:46 ` Spencer Baugh
2023-04-20 19:00 ` Eli Zaretskii
2023-04-21 18:56 ` sbaugh
2023-04-22 10:48 ` Eli Zaretskii
2023-04-22 12:57 ` sbaugh
2023-04-22 13:15 ` Eli Zaretskii
2023-04-22 21:38 ` sbaugh
2023-04-23 6:13 ` Eli Zaretskii
2023-04-23 11:48 ` sbaugh
2023-04-24 11:22 ` Eli Zaretskii
2023-05-02 15:13 ` sbaugh
2023-05-02 17:57 ` Eli Zaretskii
2023-05-08 15:48 ` Juri Linkov
2023-05-08 16:11 ` Eli Zaretskii
2023-06-03 0:58 ` Spencer Baugh
2023-06-04 7:09 ` Eli Zaretskii
2023-06-10 10:51 ` Eli Zaretskii
2023-06-12 18:27 ` Juri Linkov
2023-06-13 2:32 ` Eli Zaretskii
2023-06-13 16:54 ` Juri Linkov
2023-06-13 16:59 ` Eli Zaretskii
2023-06-13 20:59 ` Spencer Baugh
2023-06-14 17:32 ` Juri Linkov
2023-09-03 17:37 ` Juri Linkov
2023-09-04 0:30 ` sbaugh
2023-09-04 6:51 ` Juri Linkov [this message]
2023-11-14 7:39 ` Juri Linkov
2023-11-15 17:42 ` Juri Linkov
2023-04-20 18:51 ` Eli Zaretskii
2023-04-06 17:56 Spencer Baugh
2023-04-06 18:22 ` Eli Zaretskii
2023-04-06 18:58 ` Spencer Baugh
2023-04-06 19:30 ` Eli Zaretskii
2023-04-06 20:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-06 18:55 ` Juri Linkov
2023-04-06 19:22 ` Spencer Baugh
2023-04-07 16:37 ` Juri Linkov
2023-04-07 21:02 ` sbaugh
2023-04-08 6:34 ` Eli Zaretskii
2023-04-08 10:58 ` sbaugh
2023-04-08 13:19 ` Eli Zaretskii
2023-04-08 18:36 ` Juri Linkov
2023-04-08 19:32 ` Eli Zaretskii
2023-04-09 16:40 ` Juri Linkov
2023-04-09 17:38 ` Eli Zaretskii
2023-04-08 18:30 ` Juri Linkov
[not found] ` <ierbk6lup79.fsf@janestreet.com>
2024-04-07 17:16 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r0nexwh3.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=62700@debbugs.gnu.org \
--cc=sbaugh@catern.com \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).