all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Hongyi Zhao <hongyi.zhao@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: The definition of orig-fn.
Date: Tue, 05 Oct 2021 06:56:47 +0200	[thread overview]
Message-ID: <878rz8t68a.fsf@gnu.org> (raw)
In-Reply-To: <CAGP6PO+X-3W8nWqjcc9rV6OHWaFYyPyVLo_T4wrXkz3EP42smQ@mail.gmail.com>

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.

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

Bye,
Tassilo



  reply	other threads:[~2021-10-05  4:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 11:33 The definition of orig-fn Hongyi Zhao
2021-10-04 11:59 ` Tassilo Horn
2021-10-04 12:12   ` Hongyi Zhao
2021-10-04 12:23     ` Tassilo Horn
2021-10-04 13:57       ` Hongyi Zhao
2021-10-04 18:14         ` Tassilo Horn
2021-10-05  2:12           ` Hongyi Zhao
2021-10-05  4:56             ` Tassilo Horn [this message]
2021-10-05  6:06               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05  6:25               ` Hongyi Zhao
2021-10-05  6:40                 ` Hongyi Zhao
2021-10-05  7:32                 ` Tassilo Horn
2021-10-05  8:15                   ` Hongyi Zhao
2021-10-05  8:50                     ` Tassilo Horn
2021-10-05  9:41                       ` Hongyi Zhao
2021-10-05  9:43                         ` Tassilo Horn
2021-10-05 10:19                           ` Tassilo Horn
2021-10-05 10:25                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 11:55                           ` Hongyi Zhao
2021-10-05 14:21                             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 10:17                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 11:52                       ` Hongyi Zhao
2021-10-04 12:01 ` Emanuel Berg via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rz8t68a.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hongyi.zhao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.