From ede33d74113e5a2ae5eb543eb2a1a13b639517a6 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Thu, 13 Feb 2020 12:36:19 +0800 Subject: [PATCH] Fix org-roam--make-file to create files with extensions (#67) --- org-roam.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org-roam.el b/org-roam.el index 35e014e..836657f 100644 --- a/org-roam.el +++ b/org-roam.el @@ -231,6 +231,8 @@ If not provided, derive the title from the file name." (defun org-roam--make-file (file-path &optional title) "Create an org-roam file at FILE-PATH, optionally setting the TITLE attribute." + (unless (string= "org" (file-name-extension file-path)) + (setq file-path (concat file-path ".org"))) (if (file-exists-p file-path) (error (format "Aborting, file already exists at " file-path)) (if org-roam-autopopulate-title