[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 7366004e91 106/355: Fix markdown-toml front matt
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 7366004e91 106/355: Fix markdown-toml front matter format |
Date: |
Sun, 26 Jun 2022 23:58:08 -0400 (EDT) |
branch: externals/denote
commit 7366004e91462c5ed46b9a1c0109bcd42ac09fe3
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix markdown-toml front matter format
Thanks to Kaushal Modi for the feedback in issue 4 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/4>.
---
denote.el | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/denote.el b/denote.el
index fdd70dd457..e22d2c4395 100644
--- a/denote.el
+++ b/denote.el
@@ -354,13 +354,22 @@ treatment)."
(cond
((and (> (length keywords) 1) (not (stringp keywords)))
(pcase type
- ('toml (format "[ %s ]" (denote--map-quote-downcase keywords)))
+ ('toml (format "[%s]" (denote--map-quote-downcase keywords)))
(_ (mapconcat #'downcase keywords " "))))
(t
(pcase type
- ('toml (format "['%s']" (downcase keywords)))
+ ('toml (format "[%S]" (downcase keywords)))
(_ (downcase keywords))))))
+(defvar denote--tml-front-matter-format
+ "+++
+title = %S
+date = %s
+tags = %s
+identifier = %s
++++\n\n"
+ "TOML front matter value for `format'.")
+
(defun denote--file-meta-header (title date keywords id)
"Front matter for new notes.
@@ -369,13 +378,8 @@ TITLE, DATE, KEYWORDS, FILENAME, ID are all strings which
are
(let ((kw-space (denote--file-meta-keywords keywords))
(kw-toml (denote--file-meta-keywords keywords 'toml)))
(pcase denote-file-type
- ('markdown-toml (concat "+++" "\n"
- "title: " title "\n"
- "date: " date "\n"
- "tags: " kw-toml "\n"
- "identifier: " id "\n"
- "+++" "\n"
- "\n"))
+ ('markdown-toml
+ (format denote--tml-front-matter-format title date kw-toml id))
('markdown-yaml (concat "---" "\n"
"title: " title "\n"
- [elpa] externals/denote f8ea03abfb 067/355: Add documentation about renaming non-notes, (continued)
- [elpa] externals/denote f8ea03abfb 067/355: Add documentation about renaming non-notes, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 431124fea1 060/355: Generalise dired fontification, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 147901f971 072/355: Rename 'denote--directory' to 'denote-directory', ELPA Syncer, 2022/06/26
- [elpa] externals/denote a5120e0e93 061/355: Enable optional EXTENSION in file name creation, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a6303a6101 074/355: Update doc string of variable 'denote-directory', ELPA Syncer, 2022/06/26
- [elpa] externals/denote e2c49771f7 078/355: Placate the compiler about symbol disambiguation, ELPA Syncer, 2022/06/26
- [elpa] externals/denote e8c1e31dec 084/355: Expand gitignore, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 739d485600 079/355: Fix bug about missing point in link de-duplication, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3df88a05d0 096/355: Make linking aware of file types (extends 299b897), ELPA Syncer, 2022/06/26
- [elpa] externals/denote e1bd4c9cb8 094/355: BREAKING Put keywords after the title, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7366004e91 106/355: Fix markdown-toml front matter format,
ELPA Syncer <=
- [elpa] externals/denote 5fd4e97dad 105/355: Add support for markdown-toml, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1a8b57a9a8 104/355: Fix const in denote-file-type (extends 2bc5df6), ELPA Syncer, 2022/06/26
- [elpa] externals/denote c225201c49 124/355: Use appropriate name for internal variable, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a70b4cd32d 114/355: Refine backlinks' heading per file type, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7cba33e08e 119/355: LAST BREAKING CHANGE to file-naming scheme, ELPA Syncer, 2022/06/26
- [elpa] externals/denote c5a5748594 116/355: Abstract plain text front matter delimiter, ELPA Syncer, 2022/06/26
- [elpa] externals/denote e394057985 134/355: Document how to store multiple types of notes, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d90695213c 151/355: Add minor clarifications in the manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote ce41b421ef 147/355: Update denote-retrieve symbols in denote-link, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0e75e46b32 138/355: Improve denote-dired-rename-file, ELPA Syncer, 2022/06/26