[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 31fc567702 209/355: Accept optional filetype in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 31fc567702 209/355: Accept optional filetype in front matter formatter |
Date: |
Sun, 26 Jun 2022 23:58:25 -0400 (EDT) |
branch: externals/denote
commit 31fc567702cd41c4c47e264c68f01243f3687f5b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Accept optional filetype in front matter formatter
---
denote.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/denote.el b/denote.el
index ca992a3136..a4e4ef9fbe 100644
--- a/denote.el
+++ b/denote.el
@@ -470,13 +470,17 @@ and do not use any empty line before it.
These help ensure consistency and might prove useful if we need
to operate on the front matter as a whole.")
+(defun denote--file-meta-header (title date keywords id &optional filetype)
"Front matter for new notes.
TITLE, DATE, KEYWORDS, FILENAME, ID are all strings which are
- provided by `denote'."
+ provided by `denote'.
+
+Optional FILETYPE is one of the values of `denote-file-type',
+else that variable is used."
(let ((kw-space (denote--file-meta-keywords keywords))
(kw-toml (denote--file-meta-keywords keywords 'toml)))
- (pcase denote-file-type
+ (pcase (or filetype denote-file-type)
('markdown-toml (format denote-toml-front-matter title date kw-toml id))
('markdown-yaml (format denote-yaml-front-matter title date kw-space id))
('text (format denote-text-front-matter title date kw-space id
denote-text-front-matter-delimiter))
- [elpa] externals/denote 768372281f 177/355: Fix formatting typo, (continued)
- [elpa] externals/denote 768372281f 177/355: Fix formatting typo, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a47f32ec71 184/355: Implement new backlink facility, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 7674c6f854 170/355: Retrieve identifier from filename alone, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e783662363 159/355: Tweak sample configuration, ELPA Syncer, 2022/06/27
- [elpa] externals/denote fc9f909061 179/355: Change denote--id to denote--id-format, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 4a5ba1603a 190/355: Document how to write metanotes, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 92a4ff20b6 192/355: Remove obsolete description from doc string, ELPA Syncer, 2022/06/27
- [elpa] externals/denote ebd14ebbd6 187/355: Change placement of maxdepth argument for find, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 979bf352d6 208/355: Clarify requirements for good front matter value, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 0db5be04be 213/355: Use new helper FN for title value in links, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 31fc567702 209/355: Accept optional filetype in front matter formatter,
ELPA Syncer <=
- [elpa] externals/denote b64cc491bc 199/355: Add history to denote-link-add-links command, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 4041e437b2 214/355: Add PROTOTYPE of front matter rewrite post-rename, ELPA Syncer, 2022/06/27
- [elpa] externals/denote f4e7cc9ab4 222/355: Document denote-dired-post-rename-functions, ELPA Syncer, 2022/06/27
- [elpa] externals/denote edbd2f7f1b 270/355: Use our pred instead of generic in file filtering, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 10b30d1e15 232/355: Expand manual on journaling with past date, ELPA Syncer, 2022/06/27
- [elpa] externals/denote b5c7bab15c 227/355: Update manual's Acknowledgements, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 8dcb3aea4e 234/355: Add minor tweaks to the manual, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 429763c246 257/355: Fix broken buttons in backlinks' buffer, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 78f6c7ce35 279/355: Add missing doclicense.texi, ELPA Syncer, 2022/06/27
- [elpa] externals/denote b0d8ad46cf 273/355: Update denote-known-keywords doc string, ELPA Syncer, 2022/06/27