mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Make stylistic tweaks to denote--prepare-note
This commit is contained in:
parent
59eea50d4b
commit
1aedcff2d7
10
denote.el
10
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,
|
Arguments TITLE, KEYWORDS, DATE, ID, DIRECTORY, FILE-TYPE,
|
||||||
TEMPLATE, and SIGNATURE should be valid for note creation."
|
TEMPLATE, and SIGNATURE should be valid for note creation."
|
||||||
(let* ((path (denote-format-file-name
|
(let* ((extension (denote--file-extension file-type))
|
||||||
directory id keywords title (denote--file-extension file-type) signature))
|
(path (denote-format-file-name directory id keywords title extension signature))
|
||||||
;; NOTE 2025-08-02: Is it safe to assume that an
|
;; TODO 2025-08-02: Is it safe to assume that an existing and
|
||||||
;; existing+empty file is good for us to use? Otherwise, we
|
;; empty file is good for us to use? Otherwise, we should
|
||||||
;; should have a `y-or-n-p' prompt here.
|
;; have a `y-or-n-p' prompt here.
|
||||||
(buffer (if (and (file-regular-p path) (not (denote--file-empty-p path)))
|
(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)
|
(user-error "A file named `%s' already exists and is not empty" path)
|
||||||
(find-file path)))
|
(find-file path)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue