GNU bug report logs - #73234
30.0.91; completion-preview-mode doesn't trigger for case-insensitive capf

Previous Next

Package: emacs;

Reported by: Morgan Willcock <morgan <at> ice9.digital>

Date: Fri, 13 Sep 2024 19:24:02 UTC

Severity: normal

Found in version 30.0.91

Full log


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

From: Eshel Yaron <me <at> eshelyaron.com>
To: Morgan Willcock <morgan <at> ice9.digital>
Cc: 73234 <at> debbugs.gnu.org
Subject: Re: bug#73234: 30.0.91; completion-preview-mode doesn't trigger for
 case-insensitive capf
Date: Fri, 20 Sep 2024 11:27:19 +0200
Hi,

Morgan Willcock <morgan <at> ice9.digital> writes:

> Eshel Yaron <me <at> eshelyaron.com> writes:
>
>>> 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.
>>
>> We have the :exit-function (which your capf can provide as an extra
>> property alongside the completion table it returns), and indeed you
>> could use that to "fix" the case of your prefix after completing it.
>
> I don't think it is the responsibility of the completion function
> because it is not the completion function that is modifying the buffer.
>>
>> That's an interesting solution, I think.  Or do you have some other kind
>> of hook in mind?
>
> Just a hook that runs after it was completion-preview-mode that inserted
> a completion.

I'm quite not sure what you mean by responsibility, but in terms of
functionality, :exit-function is the existing interface for doing
something after a completion is inserted, and Completion Preview mode
supports this interface.

If :exit-function doesn't work for your use case, please explain why,
and if there's indeed a need for another hook, it's easy to add one :)


Thanks,

Eshel




This bug report was last modified 270 days ago.

Previous Next


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