help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The definition of orig-fn.


From: Tassilo Horn
Subject: Re: The definition of orig-fn.
Date: Tue, 05 Oct 2021 09:32:51 +0200
User-agent: mu4e 1.7.0; emacs 29.0.50

>> I don't know how that candidate selection by number actually works
>> but the advice arranges that the original `company--good-prefix-p' is
>> only called if
>>
>>   (and (stringp prefix) (string-match-p "\\`[0-9]+\\'" prefix))
>>
>> is nil and that happens only if the prefix doesn't start with a
>> number.  So I'd suggest it's essential to the use-case.
>
> Thanks for analyzing the complex advice combination function - if I
> could call it that way.
>
>> > 2. Extend the digits to a more wide range with digits letters, so that
>> > I can select and insert more candidates, as we've discussed here [1].
>>
>> The above regexp would already match 9281 but probably pressing 9
>> already selects the 9th candidate and you cannot type more?
>
> I still don't quite understand what you mean above. The currently
> implemented method can match 0-9, by mapping 0 to 10, therefore, we
> can select 10 candidates by number.

The advice suppresses calls to `company--good-prefix-p' if the prefix
matches "\\`[0-9]+\\'" which would be true for 9281, too.  That's why
I've said, the regexp would allow multi-digit prefixes but probably the
candidate selection by numeric key press doesn't because it triggers
immediately when a numeric key is pressed.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]