GNU bug report logs -
#49931
28.0.50; `choose-completion' submits incorrect string when minibuffer content changes after creation of the *Completions* buffer
Previous Next
Reported by: Visuwesh <visuwesh <at> tutanota.com>
Date: Sat, 7 Aug 2021 20:37:02 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #36 received at 49931 <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 3 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.