{"action":"created","issue":{"url":"https://api.github.com/repos/abo-abo/hydra/issues/124","labels_url":"https://api.github.com/repos/abo-abo/hydra/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/abo-abo/hydra/issues/124/comments","events_url":"https://api.github.com/repos/abo-abo/hydra/issues/124/events","html_url":"https://github.com/abo-abo/hydra/issues/124","id":71485573,"number":124,"title":"A recent change breaks find-file-other-window, switch-to-buffer-other-window, etc.","user":{"login":"zhaojiangbin","id":4935788,"avatar_url":"https://avatars.githubusercontent.com/u/4935788?v=3","gravatar_id":"","url":"https://api.github.com/users/zhaojiangbin","html_url":"https://github.com/zhaojiangbin","followers_url":"https://api.github.com/users/zhaojiangbin/followers","following_url":"https://api.github.com/users/zhaojiangbin/following{/other_user}","gists_url":"https://api.github.com/users/zhaojiangbin/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaojiangbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaojiangbin/subscriptions","organizations_url":"https://api.github.com/users/zhaojiangbin/orgs","repos_url":"https://api.github.com/users/zhaojiangbin/repos","events_url":"https://api.github.com/users/zhaojiangbin/events{/privacy}","received_events_url":"https://api.github.com/users/zhaojiangbin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-28T05:37:41Z","updated_at":"2015-04-28T17:00:29Z","closed_at":"2015-04-28T16:46:36Z","body":"I have this hydra (reduced from the actual one) which has been working as expected as of the MELPA version 20150423.653. It started behaving oddly after I upgraded to MELPA version 20150427.530:\r\n```elisp\r\n(bind-key \"C-c t\"\r\n(defhydra foo (:exit nil)\r\n  \"\r\n   foo\r\n   .\r\n\"\r\n  (\"f\" find-file)\r\n  (\"F\" find-file-other-window)\r\n  (\"b\" switch-to-buffer)\r\n  (\"B\" switch-to-buffer-other-window)\r\n  (\"<escape>\" nil)))\r\n```\r\nWhen this hydra is working, the \"F\" and \"B\" heads select or create the \"other window\" just as one would expect - when there is only one window, a new one is created by splitting, when there are two, the other is selected.\r\n\r\nWhen it is not working, a new window is created even when there are two already. Sometimes the new window takes the place that was occupied by the LV window:\r\n\r\n![screen shot 2015-04-27 at 9 55 59 pm](https://cloud.githubusercontent.com/assets/4935788/7363262/6f9ea40c-ed2c-11e4-8522-635ad3047506.png)\r\n\r\nSometimes it is created by splitting on the right of the LV window:\r\n\r\n![screen shot 2015-04-27 at 10 03 04 pm](https://cloud.githubusercontent.com/assets/4935788/7363264/762b767e-ed2c-11e4-9721-6601b2e0d42c.png)\r\n\r\n(Once the problem reproduced, I took screenshots after making the frame smaller to avoid large images. Please follow the solid box cursor to find the \"new window\" created.)\r\n\r\nIt feels that when it is not work, the LV window itself is included in consideration for choosing the \"other window\".\r\n\r\nThe problem seems to happen only when the current frame (I use only one Emacs frame almost all the time) is large enough - it reproduces reliably with full screen (by `toggle-frame-fullscreen`) or maximized (either by `toggle-frame-maximized` or dragged manually).\r\n\r\nReproduced with:\r\n- http://emacsformacosx.com/: \"GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org\"\r\n- https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-24.5-mac-5.7"},"comment":{"url":"https://api.github.com/repos/abo-abo/hydra/issues/comments/97137271","html_url":"https://github.com/abo-abo/hydra/issues/124#issuecomment-97137271","issue_url":"https://api.github.com/repos/abo-abo/hydra/issues/124","id":97137271,"user":{"login":"abo-abo","id":2937359,"avatar_url":"https://avatars.githubusercontent.com/u/2937359?v=3","gravatar_id":"","url":"https://api.github.com/users/abo-abo","html_url":"https://github.com/abo-abo","followers_url":"https://api.github.com/users/abo-abo/followers","following_url":"https://api.github.com/users/abo-abo/following{/other_user}","gists_url":"https://api.github.com/users/abo-abo/gists{/gist_id}","starred_url":"https://api.github.com/users/abo-abo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abo-abo/subscriptions","organizations_url":"https://api.github.com/users/abo-abo/orgs","repos_url":"https://api.github.com/users/abo-abo/repos","events_url":"https://api.github.com/users/abo-abo/events{/privacy}","received_events_url":"https://api.github.com/users/abo-abo/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T17:00:29Z","updated_at":"2015-04-28T17:00:29Z","body":"> By the way, I noticed that when this issue is happening, the *LV* buffer is included in the buffer list by switch-to-buffer, while in an older version of hydra that does not have this issue the *LV* buffer is not in the buffer list. Hope this helps.\r\n\r\nYes, I'm aware of this. In the change that I made, I chose not to delete `*LV*` each time before calling a head, only to re-create it afterwards, but instead to keep it.  I thought that marking `*LV*` as a dedicated window would prevent Emacs from touching it. Apparently, this assumption currently doesn't hold. So I've reverted the change temporarily, with an option to turn it back on via a variable.\r\n\r\n\r\n"}}