GNU bug report logs -
#67514
30.0.50; completion preview symbol length calculation should use point
Previous Next
Reported by: Herman, Géza <geza.herman <at> gmail.com>
Date: Tue, 28 Nov 2023 20:41:02 UTC
Severity: normal
Tags: notabug
Found in version 30.0.50
Done: Eshel Yaron <me <at> eshelyaron.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 67514 <at> debbugs.gnu.org (full text, mbox):
Géza Herman <geza.herman <at> gmail.com> writes:
> I checked out completion-preview, and so far I like it.
Great.
> There is a thing which maybe can be improved (so this is not a bug
> report, just a suggestion): it's how
> completion-preview-require-minimum-symbol-length calculates the
> length. Currently it just returns the length of the symbol under the
> cursor. I think it would be better to use the length of the part that
> actually will be used for completion, because if the point is inside a
> word, then it should only consider the part between the symbol start
> end the point.
Could you please explain why you consider that preferable? The current
behavior is intentional and, unless I'm missing something, correct.
`completion-at-point-functions` take into account text that follows
point as well as the text that precedes point, and Completion Preview
mode works also when you're typing in the middle of a symbol. For
example, consider the following text in an Elisp buffer:
--8<---------------cut here---------------start------------->8---
(minor
--8<---------------cut here---------------end--------------->8---
With point between the opening parenthesis and the letter "m", type
"define-". The completion preview displays "-mode" just after "minor",
suggesting that you complete to "define-minor-mode". That's because the
text after point ("minor", in this case) plays a role too.
Best,
Eshel
This bug report was last modified 1 year and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.