Discussion:
[emms-help] BUG: emms-show-all-mode zaps window configuration on quit
Fran Burstall
2018-06-13 22:57:23 UTC
Permalink
I have two windows open and do M-x emms-show-all. One
window is filled with track info. Now I hit 'q' to call
emms-show-all-mode-bury-buffer.

What I expect: the emms-show-all buffer to disappear and its
window to display whatever it displayed before I did M-x
emms-show-all.

What happens: the buffer and the window it was in both
disappear so I now only have one window.

Not passing the buffer name to bury-buffer (which will then
remove the buffer from the window) and not calling
delete-window fix this (at least to me) undesirable
behaviour.

Thus:

(defun emms-show-all-mode-bury-buffer ()
"Bury, and optionally kill the show buffer."
(interactive)
(bury-buffer)
;; (delete-window)
(when emms-show-all-kill-buffer-on-quit-p
(kill-buffer emms-show-all-buffer-name)))

---Fran
Yoni Rabkin
2018-06-14 03:46:02 UTC
Permalink
Post by Fran Burstall
I have two windows open and do M-x emms-show-all. One
window is filled with track info. Now I hit 'q' to call
emms-show-all-mode-bury-buffer.
What I expect: the emms-show-all buffer to disappear and its
window to display whatever it displayed before I did M-x
emms-show-all.
What happens: the buffer and the window it was in both
disappear so I now only have one window.
Not passing the buffer name to bury-buffer (which will then
remove the buffer from the window) and not calling
delete-window fix this (at least to me) undesirable
behaviour.
(defun emms-show-all-mode-bury-buffer ()
"Bury, and optionally kill the show buffer."
(interactive)
(bury-buffer)
;; (delete-window)
(when emms-show-all-kill-buffer-on-quit-p
(kill-buffer emms-show-all-buffer-name)))
I've fixed this with `quit-restore-window' and pushed to the git
repo. Can you please test it?

Thanks for the bug report.
--
"Cut your own wood and it will warm you twice"
Fran Burstall (Gmail)
2018-06-14 16:46:32 UTC
Permalink
Yup, tested this and it works fine.

Many thanks for the super-fast response!

---Fran
Post by Yoni Rabkin
Post by Fran Burstall
I have two windows open and do M-x emms-show-all. One
window is filled with track info. Now I hit 'q' to call
emms-show-all-mode-bury-buffer.
What I expect: the emms-show-all buffer to disappear and its
window to display whatever it displayed before I did M-x
emms-show-all.
What happens: the buffer and the window it was in both
disappear so I now only have one window.
Not passing the buffer name to bury-buffer (which will then
remove the buffer from the window) and not calling
delete-window fix this (at least to me) undesirable
behaviour.
(defun emms-show-all-mode-bury-buffer ()
"Bury, and optionally kill the show buffer."
(interactive)
(bury-buffer)
;; (delete-window)
(when emms-show-all-kill-buffer-on-quit-p
(kill-buffer emms-show-all-buffer-name)))
I've fixed this with `quit-restore-window' and pushed to the git
repo. Can you please test it?
Thanks for the bug report.
--
"Cut your own wood and it will warm you twice"
Loading...