diff --git a/emacs-lisp/dirvish.org b/emacs-lisp/dirvish.org index ffb4af7..692dbca 100644 --- a/emacs-lisp/dirvish.org +++ b/emacs-lisp/dirvish.org @@ -99,11 +99,12 @@ Dirvish has an issue with ~switch-to-buffer-obey-display-actions~, so advise ~sw #+begin_src emacs-lisp :tangle no (defun dirvish-side-buffer-p (buffer-or-name) "Return t if BUFFER-OR-NAME is a dirvish buffer and a side buffer." - (with-current-buffer buffer-or-name - (let ((dv (dirvish-curr))) + (when (get-buffer buffer-or-name) + (with-current-buffer buffer-or-name + (let ((dv (dirvish-curr))) (if (and dv (member 'side (dv-type dv))) t - nil)))) + nil))))) (defun dirvish-ignore-display-buffer (original-function buffer-or-name &rest original-arguments) (let ((switch-to-buffer-obey-display-actions (not (dirvish-side-buffer-p buffer-or-name))))