org-roam-insert creates the empty file

This commit is contained in:
Jethro Kuan
2020-02-05 22:49:53 +08:00
parent f5fa29b45e
commit 96f9c9f7ad

View File

@@ -108,6 +108,8 @@ Valid states are 'visible, 'exists and 'none."
(mapcar #'org-roam--get-id
(org-roam--find-all-files)))))
(let ((file-path (org-roam--get-file-path id)))
(unless (file-exists-p file-path)
(make-empty-file file-path))
(insert (format "[[%s][%s]]"
(concat "file:" file-path)
(concat org-roam-zettel-indicator id)))))