From 96f9c9f7adf224f94ec4872c8ea7ec71afe54aef Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Wed, 5 Feb 2020 22:49:53 +0800 Subject: [PATCH] org-roam-insert creates the empty file --- org-roam.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org-roam.el b/org-roam.el index e3a9b0f..1543bd5 100644 --- a/org-roam.el +++ b/org-roam.el @@ -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)))))