Hi Juan:

I just tried your ':' technique for Hyperbole button activation with Avy and it works well.  But what is the advantage over just using Avy to jump to the button and then pressing {M-RET}.  With your technique, you have to think about activating the button before you are there versus when you are on it, as you normally do.

-- rsw


On Sat, Jun 25, 2022 at 10:32 AM Juan Manuel Macías <maciaschain@posteo.net> wrote:
Hi, Robert,

Robert Weiner writes:

> We do like avy and as you say, Hyperbole can work with it.  We try to
> avoid requiring any non-builtin Emacs packages for Hyperbole.  With a
> few, we support them optionally.  Unless there is a strong use case
> for utilizing avy in certain ways, we would tend to leave that to
> others to extend Hyperbole but personally I just add it in and use its
> character and line navigation sometimes.  Did you have any particular
> uses in mind?

My use of the mouse within Emacs is practically nonexistent, and outside
of Emacs I have relegated the mouse to a few graphical applications such
as Gimp, Krita, Scribus, and little else. That's why I find avy
extremely handy for quickly navigating through text. By adding an action
to avy-dispatch-alist you can execute an arbitrary command once the
cursor has jumped to its target. For example, I have put this for
hyperbole in my init:

(add-to-list 'avy-dispatch-alist '(?: . (lambda (pt)
                                          (goto-char pt)
                                          (hkey-either))))

Thus, the typical action to activate a 'far' hyperbole button would be:

1. Call avy and insert a letter;

2. When avy's hints are displayed in the screen, I hit the colon key ":"
and then the hint letter I want to go to (an implicit button, for
example). And at the moment the associated action of that button is
executed.

For those of us who hardly use the mouse, it is really very practical,
and I think maybe mentioning that tip might be nice in the hyperbole
documentation.

Best regards,

Juan Manuel