Open yangchenyun opened 9 years ago
Show me the code of defhydra. Then explain how you get the bug in steps, from the Emacs start.
I'm guessing you did emacs -nw
, then info
, then ...
Hi Oleh, I did more test, it seems to only occur in a daemon/client mode.
emacs --daemon & emacsclient -t
Then, bring up the `M-x info', try couple times with hydra then the window will become sticky.
(defhydra hydra-info (:color blue :hint nil :idle 0.4)
"
╭────────────┐
Nav Files Navi Nodes Action │
Info-mode │
╭───────────────────────────────────────────────────────────────┴────────────╯
[_?_] summary [_[_] forward [_g_] goto node
[_<_] top node [_]_] backward [_s_] search
[_>_] final node [_f_] follow ref [_S_] case-search
[_d_] info dir [_l_] hist back [_m_] menu
[_i_] index [_r_] hist forward [_h_] help
[_I_] virtual index [_n_] next [_t_] info-to
[_L_] hist [_p_] previous
[_T_] TOC [_u_] up
"
("?" Info-summary)
("]" Info-forward-node)
("[" Info-backward-node)
("<" Info-top-node)
(">" Info-final-node)
;; ("b" beginning-of-buffer)
;; ("e" end-of-buffer)
("h" Info-help)
("d" Info-directory)
("f" Info-follow-reference)
("g" Info-goto-node)
("l" Info-history-back)
("r" Info-history-forward)
("i" Info-index)
("I" Info-virtual-index)
("L" Info-history)
("n" Info-next)
("p" Info-prev)
("s" Info-search)
("S" Info-search-case-sensitively)
("T" Info-toc)
("u" Info-up)
("m" Info-menu)
("t" hydra-info-to/body))
emacs --daemon & emacsclient -t
Then, bring up the `M-x info', try couple times with hydra then the window will become sticky.
I can't reproduce this on Linux. If you have access to Linux, try to reproduce it there - it might be an OSX specific bug.
I reproduced it on both linux / mac. I recorded a screen session: https://drive.google.com/file/d/0B3PWs5iiwLQjV3dFRHJhS0tSdmc/view?usp=sharing
The sticky part is now a window (I cannot move cursor there), it seems just a "occupied" portion of the whole frame. New hydra dialog will open up a new window, see below (only the first half is interactive).
I also tested on the emacs with GUI on ubuntu, the issue is the same and actually the some hydra definition doesn't even work. (like the snippet I copied from wiki, hydra-org-clock/body)
the Message buffer contains some error message from hydra:
hydra-disable: Invalid function: remove-function Composing main Info directory...done hydra-disable: Invalid function: remove-function
I pretty much encounter the same issue. The menu remains sticky. Note: I only use emacs in the terminal, within tmux sessions, via emacsclient.
Screenshot
I'm calling a function to compose an email in org-mode
via an hydra
(later on org-mime-org-buffer-htmlize
would be called within the buffer).
Environment
Relevant configuration
(define-key global-map (kbd "C-h M-o")
(defhydra hydra-org-rimero (:color pink :hint nil)
"
^Main^ ^Rimero^
^^^^^^^^------------------------------
_c_: Capture _n_: Notes
_a_: Agenda _b_: Bills
_e_: Email _i_: Inbox
^ ^ _A_: Accounting
^ ^ _l_: Links
"
("c" org-capture)
("a" org-agenda)
("e" ers-org-email)
("n" (find-file org-ers-notes-file))
("b" (find-file org-ers-bills-file))
("i" (find-file org-ers-inbox-file))
("A" (find-file org-ers-accounting-file))
("l" (find-file org-ers-links-file))
("q" nil)))
Steps
C-h M-o
in my configExpectations
@yangchenyun , @abo-abo , it seems that adding :exit t
to the hydra definition fixes it.
@yangchenyun can you give it a shot?
Everything works as expected after updating my hydra definition to use :exit t
.
(defhydra hydra-org-rimero (:exit t :color pink :hint nil)
"
^Main^ ^Rimero^
^^^^^^^^------------------------------
_c_: Capture _n_: Notes
_a_: Agenda _b_: Bills
_e_: Email _i_: Inbox
^ ^ _A_: Accounting
^ ^ _l_: Links
"
("c" org-capture)
("a" org-agenda)
("e" ers-org-email)
("n" (find-file org-ers-notes-file))
("b" (find-file org-ers-bills-file))
("i" (find-file org-ers-inbox-file))
("A" (find-file org-ers-accounting-file))
("l" (find-file org-ers-links-file))
("q" nil))
@yveszoundi I was just about to reply, but you fould your issue. Swapping pink
for teal
would also work.
@yveszoundi Thanks, I am giving it a shot and will verify it later.
The window will always be there no matter no matter what key I press.
I could provide more debug info if you point me to the right place to look at.