(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.
This commit is contained in:
Jethro Kuan
2021-11-23 00:23:03 +08:00
committed by GitHub
parent 91aae05810
commit e4188179f6

View File

@ -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))