emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote eba5cd4c35 3/7: Make denote-commands-for-new-not


From: ELPA Syncer
Subject: [elpa] externals/denote eba5cd4c35 3/7: Make denote-commands-for-new-notes a user option
Date: Fri, 13 Oct 2023 06:57:55 -0400 (EDT)

branch: externals/denote
commit eba5cd4c358d1e7c3d4f7110184cddeeb5189470
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Make denote-commands-for-new-notes a user option
---
 README.org | 21 +++++++++++++++++++++
 denote.el  | 24 +++++++++++++++---------
 2 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/README.org b/README.org
index a7770f931e..447d513beb 100644
--- a/README.org
+++ b/README.org
@@ -2177,6 +2177,27 @@ aliased ~denote-link-insert-links-matching-regexp~.  The 
purpose of
 these aliases is to offer alternative, more descriptive names of
 select commands.
 
+* Choose which commands to prompt for
+:PROPERTIES:
+:CUSTOM_ID: h:98c732ac-da0e-4ebd-a0e3-5c47f9075e51
+:END:
+
+[ Part of {{{development-version}}}. ]
+
+#+vindex: denote-commands-for-new-notes
+The user option ~denote-commands-for-new-notes~ specifies a list of
+commands that are available at the ~denote-command-prompt~.  This
+prompt is used by Denote commands that ask the user how to create a
+new note, as described elsewhere in this manual:
+
+- [[#h:ad91ca39-cf10-4e16-b224-fdf78f093883][Open an existing note or create 
it if missing]]
+- [[#h:b6056e6b-93df-4e6b-a778-eebd105bac46][Link to a note or create it if 
missing]]
+
+The default value includes all the basic file-creating commands
+([[#h:17896c8c-d97a-4faa-abf6-31df99746ca6][Points of entry]]).  Users may 
customise this value if (i) they only
+want to see fewer options and/or (ii) wish to include their own custom
+command in the list ([[#h:11946562-7eb0-4925-a3b5-92d75f1f5895][Write your own 
convenience commands]]).
+
 * Fontification in Dired
 :PROPERTIES:
 :CUSTOM_ID: h:337f9cf0-9f66-45af-b73f-f6370472fb51
diff --git a/denote.el b/denote.el
index 556be1e07c..073b42f9da 100644
--- a/denote.el
+++ b/denote.el
@@ -475,6 +475,21 @@ structure template as soon as `denote-region' is done:
   :package-version '(denote . "2.1.0")
   :type 'hook)
 
+(defcustom denote-commands-for-new-notes
+  '(denote
+    denote-date
+    denote-subdirectory
+    denote-template
+    denote-type
+    denote-signature)
+  "List of commands for `denote-command-prompt' that create a new note.
+These are used by commands such as `denote-open-or-create-with-command'
+and `denote-link-after-creating-with-command'."
+  :group 'denote
+  :package-version '(denote . "2.1.0")
+  :link '(info-link "(denote) Choose which commands to prompt for")
+  :type '(repeat symbol))
+
 ;;;; Main variables
 
 ;; For character classes, evaluate: (info "(elisp) Char Classes")
@@ -1615,15 +1630,6 @@ increment it 1 second at a time until an available id is 
found."
 
 (make-obsolete 'denote-barf-duplicate-id nil "2.1.0")
 
-(defconst denote-commands-for-new-notes
-  '(denote
-    denote-date
-    denote-subdirectory
-    denote-template
-    denote-type
-    denote-signature)
-  "List of commands for `denote-command-prompt' that create a new note.")
-
 (defvar denote--command-prompt-history nil
   "Minibuffer history for `denote-command-prompt'.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]