mirror of
https://github.com/org-roam/org-roam
synced 2025-08-09 12:57:22 -05:00
(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:
@ -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
|
(find-file-noselect ,file)))) ; Else, visit FILE and return buffer
|
||||||
res)
|
res)
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(unless (equal major-mode 'org-mode)
|
(unless (derived-mode-p 'org-mode)
|
||||||
(delay-mode-hooks
|
(delay-mode-hooks
|
||||||
(let ((org-inhibit-startup t)
|
(let ((org-inhibit-startup t)
|
||||||
(org-agenda-files nil))
|
(org-agenda-files nil))
|
||||||
|
Reference in New Issue
Block a user