(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:
parent
b5f3f04318
commit
d099f9bef9
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue