Fix conflict between :ui popup & org-src-window-setup
When set to split-window-*, other-frame, or current-window.
This commit is contained in:
parent
e20f574b2e
commit
f716aa5158
1 changed files with 12 additions and 1 deletions
|
@ -266,7 +266,18 @@ Ugh, such an ugly hack."
|
|||
:around #'org-switch-to-buffer-other-window
|
||||
(if +popup-mode
|
||||
(pop-to-buffer buf nil norecord)
|
||||
(funcall orig-fn buf norecord))))
|
||||
(funcall orig-fn buf norecord)))
|
||||
|
||||
;; HACK `pop-to-buffer-same-window' consults `display-buffer-alist', which is
|
||||
;; what our popup manager uses to manage popup windows. However,
|
||||
;; `org-src-switch-to-buffer' already does its own window management
|
||||
;; prior to calling `pop-to-buffer-same-window', so there's no need to
|
||||
;; _then_ hand off the buffer to the pop up manager.
|
||||
(defadvice! +popup--org-src-switch-to-buffer-a (orig-fn &rest args)
|
||||
:around #'org-src-switch-to-buffer
|
||||
(cl-letf (((symbol-function #'pop-to-buffer-same-window)
|
||||
(symbol-function #'switch-to-buffer)))
|
||||
(apply orig-fn args))))
|
||||
|
||||
|
||||
;;;###package persp-mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue