branch: externals/denote commit 0cc5f450d72348bab71486108a22d64a4e9d00ea Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com> Commit: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>
Fix regression when renaming new unsaved note --- denote.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/denote.el b/denote.el index 204ad73d75..cb9c854046 100644 --- a/denote.el +++ b/denote.el @@ -3088,7 +3088,7 @@ entire file content." This is checked against its front matter definition. If the front matter definition has no lines, this function returns non-nil." (let* ((front-matter (denote--front-matter file-type)) - (file-content (with-temp-buffer (insert-file-contents file) (buffer-string))) + (file-content (with-current-buffer (find-file-noselect file) (buffer-string))) (components-in-template (denote--get-front-matter-components-order front-matter file-type)) (components-in-file (denote--get-front-matter-components-order file-content file-type))) (or (null components-in-template)