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: Hongyi Zhao
Subject: Re: The definition of orig-fn.
Date: Tue, 5 Oct 2021 14:25:59 +0800

On Tue, Oct 5, 2021 at 1:01 PM Tassilo Horn <tsdh@gnu.org> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> 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.

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.

> 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.

Thank you for your suggestion. I'll try to communicate with abo-abo.

HZ



reply via email to

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