unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 49931@debbugs.gnu.org
Subject: bug#49931: 28.0.50; `choose-completion' submits incorrect string when minibuffer content changes after creation of the *Completions* buffer
Date: Tue, 05 Apr 2022 21:54:27 +0300	[thread overview]
Message-ID: <86wng3icnw.fsf@mail.linkov.net> (raw)
In-Reply-To: <86ilsj574h.fsf@mail.linkov.net> (Juri Linkov's message of "Sat,  12 Mar 2022 20:49:58 +0200")

close 49931 29.0.50
thanks

>>>> 3. click on an existing valid completion in the *Completions* buffer,
>>>>    e.g. on “append”
>>
>> completion-base-position was set at step (1) to cover the empty text
>> after the prompt, so this empty text (which is now right in front of
>> "blabla") is replaced with "append" resulting in "appendblabla".
>>
>> Obviously, the result is not what we want.
>> Now sure how to change which part, tho.  Maybe instead of
>> completion-base-position we should store the prefix and suffix strings,
>> so when you select an entry from *Completions* we just clear the
>> minibuffer and replace it with (concat prefix selection suffix)?
>
> Now I tried this, and it works correctly.  But not sure how to make
> this change as backward-compatible as possible.  One variant
> would be to save '("prefix" "suffix") instead of '(10 11)
> in 'completion-base-position' but this might fail in some existing code.
>
> So maybe better to add a new variable 'completion-base-affixes'.
> Then whether to use 'completion-base-position'
> or 'completion-base-affixes' could be defined by the new user option
> 'completion-use-base-affixes'.

Now this patched is pushed to master, and the bug report is closed.





      reply	other threads:[~2022-04-05 18:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 17:20 bug#49931: 28.0.50; `choose-completion' submits incorrect string when minibuffer content changes after creation of the *Completions* buffer Visuwesh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-08  5:14 ` Eli Zaretskii
2021-08-08  7:02   ` Visuwesh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-08  7:14     ` Eli Zaretskii
2021-08-08  7:31       ` Visuwesh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-08  8:19         ` Eli Zaretskii
2021-08-10  7:07 ` Juri Linkov
2021-08-10  9:00   ` Visuwesh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-12 18:49   ` Juri Linkov
2022-04-05 18:54     ` Juri Linkov [this message]

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=86wng3icnw.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=49931@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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).