Subject: bug#73234: 30.0.91; completion-preview-mode doesn't trigger for case-insensitive capf

From: Morgan Willcock <[email-masked]>
Date: Wed, 18 Sep 2024 21:23:44 +0100

Eshel Yaron <[email-masked]> writes:

> FYI, I've added a new user option completion-preview-ignore-case on the
> master branch (commit f1794a17b62), which controls case sensitivity for
> Completion Preview mode specifically.  This is definitely safe to set
> buffer-locally.  The docstring of this new variable should hopefully
> also explain exactly what's the expected behavior in this regard.

Thanks for adding the new option.  For my use case I don't think I would
be able to use it because the case mismatch between the text already
typed and the completion will effectively be generating a completion
which may not actually exist.

e.g. If a valid completion was "FooBar", and I typed "foo", having the
final result as "fooBar" wouldn't be ideal.

I've been trying to think of a way to get it to work without disturbing
the user interface that already exists.  Maybe it would be possible
fixup the result in a post-insertion hook if one existed - such a hook
might be generally useful anyway.

In the long term though, I really think that the preview should be
allowed to overlap with the text already typed and potentially replace
it when the completion is inserted, but I appreciate that it would be a
big change in the internals to please a minority.

Morgan

-- 
Morgan Willcock