mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): enable org-mode in temp buffers (#957)
Fixes #956. The extraction of links rely on appropriate regexp being set for outline-mode, to determine the outline information. Because the information were extracted in a temporary buffer, the outline regexp was not set. This corrects for that, but probably adds significant extraction time.
This commit is contained in:
@ -45,7 +45,9 @@ If FILE, set `org-roam-temp-file-name' to file and insert its contents."
|
||||
(let ((current-org-roam-directory (make-symbol "current-org-roam-directory")))
|
||||
`(let ((,current-org-roam-directory org-roam-directory))
|
||||
(with-temp-buffer
|
||||
(let ((org-roam-directory ,current-org-roam-directory))
|
||||
(let ((org-roam-directory ,current-org-roam-directory)
|
||||
(org-mode-hook nil))
|
||||
(org-mode)
|
||||
(when ,file
|
||||
(insert-file-contents ,file)
|
||||
(setq-local org-roam-file-name ,file))
|
||||
|
Reference in New Issue
Block a user