[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote b05ea22a11 05/39: Add private function to normal
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote b05ea22a11 05/39: Add private function to normalise denote-prompts |
Date: |
Mon, 11 Jul 2022 00:57:40 -0400 (EDT) |
branch: externals/denote
commit b05ea22a11eed5fc59b240c9f853045828d4319d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add private function to normalise denote-prompts
---
denote.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/denote.el b/denote.el
index 46862e4e85..0d9af67b5d 100644
--- a/denote.el
+++ b/denote.el
@@ -693,6 +693,20 @@ Optional DEFAULT-TITLE is used as the default value."
;;;;; The `denote' command
+(defun denote--prompts ()
+ "Normalize value of `denote-prompts'.
+Return a list with `title' and `keywords' as its elements if its
+value (i) is not a list (ii) is nil, (iii) does not contain the
+appropriate symbols, per `denote--prompt-symbols'."
+ (let* ((prompts denote-prompts)
+ (symbols denote--prompt-symbols)
+ (common (seq-intersection prompts symbols)))
+ (if (or (not (listp prompts))
+ (null prompts)
+ (null common))
+ '(title keywords)
+ common)))
+
;;;###autoload
(defun denote (&optional title keywords type date subdir)
"Create a new note with the appropriate metadata and file name.
- [elpa] externals/denote 71b56a6b0f 22/39: Refine interactive spec of 'denote' command, (continued)
- [elpa] externals/denote 71b56a6b0f 22/39: Refine interactive spec of 'denote' command, ELPA Syncer, 2022/07/11
- [elpa] externals/denote cb863db07d 25/39: Change order of arguments in 'denote', ELPA Syncer, 2022/07/11
- [elpa] externals/denote 61f48726b0 07/39: Clarify denote-prompts empty title case, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 7c36c51665 09/39: Update doc string of 'denote' command, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 60915b3104 33/39: Merge branch 'refactor-denote-prompts', ELPA Syncer, 2022/07/11
- [elpa] externals/denote fcd182f0ff 36/39: Add 'denote-directory' Info link to silos, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 218f7132bf 15/39: Remove private denote--prompts function, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 10e815c3fe 17/39: Refine denote-prompts Custom UI type, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 92e15886d5 20/39: Avoid errors with string value for keywords, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 5761ec5f89 34/39: BREAKING update journal samples for current 'denote', ELPA Syncer, 2022/07/11
- [elpa] externals/denote b05ea22a11 05/39: Add private function to normalise denote-prompts,
ELPA Syncer <=
- [elpa] externals/denote d8ae24a80f 13/39: Merge branch 'main' into refactor-denote-prompts, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 8ea2a7b65d 30/39: Tweak denote-prompts doc string, ELPA Syncer, 2022/07/11
- [elpa] externals/denote d1a3fe3989 31/39: Revise manual on note creation; add denote-prompts, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 2c0727eb37 32/39: Add :link to manual in 'denote-prompts' definition, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 9cdd77d425 10/39: Add TODO for 'denote' command Lisp arguments, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 258ddc7b2c 02/39: Update denote-prompts doc string, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 0326ab3d75 04/39: Add TODO for denote-prompts value, ELPA Syncer, 2022/07/11
- [elpa] externals/denote 05e70d4e5c 11/39: Update doc strings of convenience commands, ELPA Syncer, 2022/07/11
- [elpa] externals/denote c2c0d74dc1 16/39: Fix typo in denote-prompts doc string, ELPA Syncer, 2022/07/11
- [elpa] externals/denote c56ddd3fb9 19/39: Update doc string of 'denote' command, ELPA Syncer, 2022/07/11