[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 3775a61028: Allow nil :front-matter in denote-fi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 3775a61028: Allow nil :front-matter in denote-file-types |
Date: |
Tue, 4 Oct 2022 10:57:30 -0400 (EDT) |
branch: externals/denote
commit 3775a61028c4e12530392018428b95279aabcabf
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Allow nil :front-matter in denote-file-types
The 'denote-file-types' is, for the time being, specified as a
'defvar' for advanced users. We do eventually want to turn it into a
defcustom, assuming there is a need for it (we will figure it out
through further testing).
This change allows the ':front-matter' property to accept a nil value,
which we internally read as an empty string.
Thanks to Noboru Ota (nobiot) for pointing this out on the mailing list:
<https://lists.sr.ht/~protesilaos/denote/%3C86k05gsqsg.fsf%40nobiot.com%3E>.
---
denote.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index 33c5bd67ef..97cf276e6a 100644
--- a/denote.el
+++ b/denote.el
@@ -1159,9 +1159,10 @@ Apply `downcase' to KEYWORDS."
TITLE, DATE, KEYWORDS, FILENAME, ID are all strings which are
provided by `denote'. FILETYPE is one of the values of
`denote-file-type'."
- (let ((title (denote--format-front-matter-title title filetype))
- (kws (denote--format-front-matter-keywords keywords filetype)))
- (format (denote--front-matter filetype) title date kws id)))
+ (let* ((fm (denote--front-matter filetype))
+ (title (denote--format-front-matter-title title filetype))
+ (kws (denote--format-front-matter-keywords keywords filetype)))
+ (if fm (format fm title date kws id) "")))
(defun denote--path (title keywords dir id file-type)
"Return path to new file with ID, TITLE, KEYWORDS and FILE-TYPE in DIR."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/denote 3775a61028: Allow nil :front-matter in denote-file-types,
ELPA Syncer <=