GNU bug report logs - #48356
28.0.50; choose-completion discards the suffix after the completion boundary

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Tue, 11 May 2021 17:24:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, JD Smith <jdtsmith <at> gmail.com>,
 48356 <at> debbugs.gnu.org
Subject: Re: bug#48356: 28.0.50; choose-completion discards the suffix after
 the completion boundary
Date: Mon, 14 Mar 2022 20:53:15 +0200
>> For example when completing a file path "~/emacs/master/li|/calc", where
>> "|" is the cursor, and then the candidate "lisp" is selected in the
>> *Completions* buffer, the result is "~/emacs/master/lisp/". The prefix
>> "~/emacs/master/" is prepended to the selected candidate, but the suffix
>> "/calc" is discarded.
>
> Yup.  That's listed under "bugs" at the beginning of minibuffer.el:
>
>     ;; - choose-completion can't automatically figure out the boundaries
>     ;;   corresponding to the displayed completions because we only
>     ;;   provide the start info but not the end info in
>     ;;   completion-base-position.
>
>> ... and the suffix is preserved.
>
> Of course, the suffix should *not* be preserved when the minibuffer was
> "r|e-buf".

IMHO, the root of the problem is in completion-all-completions
that returns in the last `cdr' only the start of completions,
but not the end of completions.




This bug report was last modified 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.