GNU bug report logs - #28550
25.2; Hydra: First example hydra in the docs doesn't work

Previous Next

Package: emacs;

Reported by: nljlistbox2 <at> gmail.com (N. Jackson)

Date: Fri, 22 Sep 2017 15:24:02 UTC

Severity: normal

Tags: notabug

Found in version 25.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 28550 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Oleh Krehel <ohwoeowho <at> gmail.com>, 28550 <at> debbugs.gnu.org
Subject: Re: bug#28550: 25.2;
 Hydra: First example hydra in the docs doesn't work
Date: Sat, 23 Sep 2017 12:49:36 -0400
At 18:19 +0200 on Saturday 2017-09-23, Michael Heerdegen wrote:
>
> As far as I understand the definition of `defhydra', the example won't
> do what the OP expects unless you additionally eval
>
>   (global-set-key [f2] 'hydra-zoom/body)
>
> Without that, the hydra hinting kicks in only after you have hit another
> hydra key after hitting the prefix key.

Indeed. When I asked about this on the Emacs Help list a few days
ago, Marcin Borkowski pointed that out, and indeed, as I mentioned
there, following this suggestion I tried:

  (defhydra hydra-zoom ()
    "zoom"
    ("g" text-scale-increase "in")
    ("l" text-scale-decrease "out"))

  (global-set-key (kbd "<f2>") 'hydra-zoom/body)

and this does work just fine. :)

Sorry. I should have mentioned that in this bug report.

So this bug report is about the

  (defhydra hydra-zoom (global-map "<f2>") ... )

form not working and/or about the doc where this is used as the
first example.

N.





This bug report was last modified 6 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.