[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 1ab9171bfe 1/2: Add denote--front-matter-keyword
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 1ab9171bfe 1/2: Add denote--front-matter-keywords-to-list helper |
Date: |
Fri, 5 Aug 2022 01:57:28 -0400 (EDT) |
branch: externals/denote
commit 1ab9171bfedd3b3b4db042a7b3fea1fb13bdabf5
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add denote--front-matter-keywords-to-list helper
This is part of the work being done to add a "reverse rename" operation
which will rename a file based on its front matter.
Issue on the GitHub mirror:
<https://github.com/protesilaos/denote/issues/74>.
Mailing list threads (I wish they were not split like that, but here we
are):
-
<https://lists.sr.ht/~protesilaos/denote/%3C87k081l6vw.fsf%40silverstone.mail-host-address-is-not-set%3E>
-
<https://lists.sr.ht/~protesilaos/denote/%3C878rogw5kk.fsf%40protesilaos.com%3E>
-
<https://lists.sr.ht/~protesilaos/denote/%3C87fsiljv1s.fsf%40hu.mail-host-address-is-not-set%3E>
-
<https://lists.sr.ht/~protesilaos/denote/%3C87r122afe3.fsf%40hu.mail-host-address-is-not-set%3E>
---
denote.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/denote.el b/denote.el
index dc0a5534ae..d597e4f050 100644
--- a/denote.el
+++ b/denote.el
@@ -1169,6 +1169,11 @@ operation on multiple files."
(make-obsolete 'denote-dired-rename-expert nil "0.5.0")
(make-obsolete 'denote-dired-post-rename-functions nil "0.4.0")
+(defun denote--front-matter-keywords-to-list (keywords)
+ "Return string of KEYWORDS as a list of strings.
+This is the inverse of `denote--format-front-matter-keywords'."
+ (split-string keywords "[:,\s]+" t "[][ \"']+"))
+
;;;;; The renaming commands and their prompts
(defun denote--rename-dired-file-or-prompt ()