Show org-goto help window in a popup #3254

Rather than taking up a whole window only to show three lines of text.
This commit is contained in:
Henrik Lissner 2020-05-31 21:01:45 -04:00
parent 8e34998433
commit 416f155d67
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -236,6 +236,7 @@ the command buffer."
org-capture-place-template org-capture-place-template
org-export--dispatch-ui org-export--dispatch-ui
org-agenda-get-restriction-and-command org-agenda-get-restriction-and-command
org-goto-location
org-fast-tag-selection org-fast-tag-selection
org-fast-todo-selection) org-fast-todo-selection)
(if +popup-mode (if +popup-mode
@ -244,6 +245,21 @@ the command buffer."
(apply orig-fn args)) (apply orig-fn args))
(apply orig-fn args))) (apply orig-fn args)))
(defadvice! +popup--org-fix-goto-a (orig-fn &rest args)
"`org-goto' uses `with-output-to-temp-buffer' to display its help buffer,
for some reason, which is very unconventional, and so requires these gymnastics
to tame (i.e. to get the popup manager to handle it)."
:around #'org-goto-location
(if +popup-mode
(letf! (defun internal-temp-output-buffer-show (buffer)
(let ((temp-buffer-show-function
(doom-rpartial #'+popup-display-buffer-stacked-side-window-fn nil)))
(with-current-buffer buffer
(hide-mode-line-mode +1))
(funcall internal-temp-output-buffer-show buffer)))
(apply orig-fn args))
(apply orig-fn args)))
(defadvice! +popup--org-fix-popup-window-shrinking-a (orig-fn &rest args) (defadvice! +popup--org-fix-popup-window-shrinking-a (orig-fn &rest args)
"Hides the mode-line in *Org tags* buffer so you can actually see its "Hides the mode-line in *Org tags* buffer so you can actually see its
content and displays it in a side window without deleting all other windows. content and displays it in a side window without deleting all other windows.