unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
Cc: help-gnu-emacs@gnu.org, Hongyi Zhao <hongyi.zhao@gmail.com>
Subject: Re: The definition of orig-fn.
Date: Tue, 05 Oct 2021 12:19:40 +0200	[thread overview]
Message-ID: <87mtnnsr0g.fsf@gnu.org> (raw)
In-Reply-To: <87r1czsszg.fsf@gnu.org>


>> Without further keyboard remapping, this scheme will require at least
>> two keystrokes to complete a candidate insertion. I think abo-abo's
>> customized function is just for solving this type of problem: One
>> keystroke for one candidate insertion.
>
> Yes, that's a tradeoff.  With De Bruijn, you can make as many
> candidates as you need selectable but of course each key sequence
> becomes longer the more candidates and the smaller the alphabet (set
> of keys allowed for candidate selection).  With just the digits 0-9,
> you can only make 10 selectable.

Just a short correction: you don't need De Bruijn for the former but
arbitrary longer same-length key sequences will do.

The nice property of De Bruijn is that the key sequences overlap nicely
so that, in the context of avy, when jumping to occurrences of the
character x and the word "axxis", it would be annotated by overlays so
that you get

      axxis
       ab    <-- overlay for the first x
        ba   <-- overlay for the second x

which would look like "aabas" in the buffer where the first ab- and
second ba-overlay are fontified distinguishably.  So you have a shortcut
for jumping to each occurrence of x which can be printed correctly
although their annotating overlays overlap because the overlapping part
is equal for both of them.

In the candidate selection for company, De Bruijn is not of importance
because every candidate is shown on its own line anyway so there is no
need to be clever about overlapping parts.

Bye,
Tassilo



  reply	other threads:[~2021-10-05 10:19 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87mtnnsr0g.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).