From e4188179f6a57430f74ee02790b2b4f8c735d445 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Tue, 23 Nov 2021 00:23:03 +0800 Subject: [PATCH] (fix)utils: fix org-roam-with-file changing the major-mode (#1980) `org-roam-with-file` should not alter the major-mode if the mode is already derived from org-mode. --- org-roam-utils.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-roam-utils.el b/org-roam-utils.el index ffc3a8d..43a6322 100644 --- a/org-roam-utils.el +++ b/org-roam-utils.el @@ -87,7 +87,7 @@ Kills the buffer if KEEP-BUF-P is nil, and FILE is not yet visited." (find-file-noselect ,file)))) ; Else, visit FILE and return buffer res) (with-current-buffer buf - (unless (equal major-mode 'org-mode) + (unless (derived-mode-p 'org-mode) (delay-mode-hooks (let ((org-inhibit-startup t) (org-agenda-files nil))