[Top][All Lists]

[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 06:56:47 +0200
User-agent: mu4e 1.7.0; emacs 29.0.50

Hongyi Zhao <> writes:

>> Ok.  I somehow lost the contex.  In your first message you've asked what
>> `orig-fn' is and Emanuel and me told you.  But I can't follow your later
>> two replies, especially I'm not sure if you are still asking for
>> help. :-)
> Basically, I'm asking or trying to figure out the following questions:
> 1. Whether can I delete out the advice function used in the code
> snippet by abo-abo, without affecting the actual function it produces:
> Insert the company candidates with digits, unless the number is
> potentially part of the candidate; In that case, insert the number.

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.

> 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?  If that's
the case, I'm out of ideas given that I don't know the code.  But I'd
ask abo-abo, e.g., by opening an issue with your question.


reply via email to

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