From dd33f5751368d509394d44939513d7eaea55d892 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 9 Feb 2022 14:53:47 +0100 Subject: [PATCH] fix(org): don't auto-open roam buffer if in capture popup --- modules/lang/org/contrib/roam2.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/contrib/roam2.el b/modules/lang/org/contrib/roam2.el index 8dde905c8..a392bee3f 100644 --- a/modules/lang/org/contrib/roam2.el +++ b/modules/lang/org/contrib/roam2.el @@ -95,8 +95,9 @@ In case of failure, fail gracefully." (add-hook! 'org-roam-find-file-hook :append (defun +org-roam-open-with-buffer-maybe-h () (and +org-roam-open-buffer-on-find-file - (not org-roam-capture--node) ;; don't proc for roam capture buffers - (not org-capture-mode) ;; don't proc for normal capture buffers + (not org-roam-capture--node) ; not for roam capture buffers + (not org-capture-mode) ; not for capture buffers + (not (bound-and-true-p +popup-buffer-mode)) (not (eq 'visible (org-roam-buffer--visibility))) (org-roam-buffer-toggle))))