(fix): set default-directory in org-roam-with-temp-buffer (#1300)

This ensures that relative paths in keywords such as `#+setupfile:` and
`#+include:` work when building cache etc.
master
Tim Quelch 5 years ago committed by GitHub
parent 060a29c91d
commit dbed2bcf5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      org-roam-macs.el

@ -62,7 +62,8 @@ If FILE, set `org-roam-temp-file-name' to file and insert its contents."
(with-temp-buffer (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-hook nil)
(org-inhibit-startup t)) (org-inhibit-startup t)
(default-directory (file-name-directory ,file)))
(org-mode) (org-mode)
(when ,file (when ,file
(insert-file-contents ,file) (insert-file-contents ,file)

Loading…
Cancel
Save