(bugfix): force a cache update on making a new file (#107)

This commit is contained in:
Jethro Kuan
2020-02-17 19:02:46 +08:00
committed by GitHub
parent 424de1f0cb
commit 659babf922

View File

@@ -239,7 +239,10 @@ If not provided, derive the title from the file name."
(error (format "Aborting, file already exists at %s" file-path))
(if org-roam-autopopulate-title
(org-roam--populate-title file-path title)
(make-empty-file file-path))))
(make-empty-file file-path))
(save-excursion
(with-current-buffer (find-file-noselect file-path)
(org-roam--update-cache)))))
(defun org-roam--new-file-named (slug)
"Create a new file named `SLUG'.