branch: externals/denote
commit 22b96a2baf0eaf320256b80d2e8eeddb4043231d
Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>

    Fix regression in denote-prepend-front-matter
---
 denote.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index abdbb65596..3dba1af90d 100644
--- a/denote.el
+++ b/denote.el
@@ -3125,7 +3125,9 @@ The TITLE, KEYWORDS, DATE, ID, SIGNATURE, and FILE-TYPE 
are passed from
 the renaming command and are used to construct a new front matter block
 if appropriate."
   (when-let* ((new-front-matter (denote--format-front-matter title date 
keywords id signature file-type)))
-    (denote--file-with-temp-buffer file
+    (with-current-buffer (if (denote--file-type-org-extra-p)
+                             denote-last-path-after-rename
+                           (find-file-noselect file))
       (goto-char (point-min))
       (insert new-front-matter))))
 

Reply via email to