[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 12:19:40 +0200
User-agent: mu4e 1.7.0; emacs 29.0.50

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

       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.


reply via email to

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