[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 47e313e9805: Unbind 'C-M-i' in Text mode
From: |
Eshel Yaron |
Subject: |
Re: master 47e313e9805: Unbind 'C-M-i' in Text mode |
Date: |
Wed, 06 Dec 2023 14:56:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 06/12/2023 09:53, Eshel Yaron wrote:
>> Hi Dmitry,
>> Dmitry Gutov <dmitry@gutov.dev> writes:
>>
>>>> +(defun ispell-completion-at-point ()
>>>> + "Word completion function for use in `completion-at-point-functions'."
>>>> [...]
>>>> + (list beg end (cdr all)
>>>> + :annotation-function (lambda (_) " Dictionary word")
>>>
>>> I have to say that "Dictionary word" is not a great annotation: it's
>>> long, longer than most of the completions coming from that backend, so
>>> these words, repeated, constitute most of the text inside the
>>> Completions buffer. And it's the same string for all completions.
>> I see what you mean. How do you feel about the following
>> alternatives?
>> - "Word"
>> - "Dict"
>> - "Spell"/"Ispell"
>> - "🕮"
>> - No annotation at all
>> - One of the above, and make it configurable
>
> My preference would be "no annotation at all", if we're talking about
> simple solutions.
Fine by me. I'm attaching a simple patch that does that.
> The fourth option was a newspaper emoji?
Well, it's supposed to be a book, you get it with `C-x 8 RET book RET`.
> I think the more comprehensive approach here would be to implement
> support for `:company-kind` in the default UI, and then return `text'
> in that function.
I agree, that would be nice in general and help here too. For this case
I was also thinking about using the common part-of-speech of each word
as its annotation (e.g. "n" for nouns, "v" for verbs...) but we don't
get that information from the spelling dictionary, unfortunately.
Here's that patch:
0001-Remove-long-annotation-for-word-completion-candidate.patch
Description: Text Data