From 1aedcff2d720349f2a279fdb9cbe1ab92fa04163 Mon Sep 17 00:00:00 2001 From: Protesilaos Date: Tue, 12 May 2026 13:25:01 +0300 Subject: [PATCH] Make stylistic tweaks to denote--prepare-note --- denote.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/denote.el b/denote.el index 2724568..b099ec1 100644 --- a/denote.el +++ b/denote.el @@ -3086,11 +3086,11 @@ which case it is not added to the base file name." Arguments TITLE, KEYWORDS, DATE, ID, DIRECTORY, FILE-TYPE, TEMPLATE, and SIGNATURE should be valid for note creation." - (let* ((path (denote-format-file-name - directory id keywords title (denote--file-extension file-type) signature)) - ;; NOTE 2025-08-02: Is it safe to assume that an - ;; existing+empty file is good for us to use? Otherwise, we - ;; should have a `y-or-n-p' prompt here. + (let* ((extension (denote--file-extension file-type)) + (path (denote-format-file-name directory id keywords title extension signature)) + ;; TODO 2025-08-02: Is it safe to assume that an existing and + ;; empty file is good for us to use? Otherwise, we should + ;; have a `y-or-n-p' prompt here. (buffer (if (and (file-regular-p path) (not (denote--file-empty-p path))) (user-error "A file named `%s' already exists and is not empty" path) (find-file path)))