From e54432349976d5ec46fbc4048a4cdc15ffa3d56b Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Fri, 7 Feb 2020 13:06:54 +0800 Subject: [PATCH] remove check for org-mode in maybe-update-buffer Some packages like org-journal define their own major mode. In addition, the checks that the files are part of the org-roam ecosystem should be sufficient. --- org-roam.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org-roam.el b/org-roam.el index a8ce95c..f57a967 100644 --- a/org-roam.el +++ b/org-roam.el @@ -309,8 +309,7 @@ Valid states are 'visible, 'exists and 'none." This needs to be quick/infrequent, because this is run at `post-command-hook'." (with-current-buffer (window-buffer) - (when (and (eq major-mode 'org-mode) - (get-buffer org-roam-buffer) + (when (and (get-buffer org-roam-buffer) (buffer-file-name (window-buffer)) (not (string= org-roam-current-file-id (org-roam--get-id (file-truename (buffer-file-name (window-buffer)))))) (member (file-truename (buffer-file-name (window-buffer))) (org-roam--find-all-files)))