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

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

[elpa] externals/denote 67c80d6766 4/6: Expand "link or create", "open o


From: ELPA Syncer
Subject: [elpa] externals/denote 67c80d6766 4/6: Expand "link or create", "open or create" commands
Date: Sun, 18 Sep 2022 08:57:31 -0400 (EDT)

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

    Expand "link or create", "open or create" commands
    
    This is based on the discussion over at the mailing list:
    
<https://lists.sr.ht/~protesilaos/denote/%3C87fsgvddny.fsf%40protesilaos.com%3E>.
---
 denote.el | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/denote.el b/denote.el
index 3f4d6fab57..30328814b4 100644
--- a/denote.el
+++ b/denote.el
@@ -2273,22 +2273,111 @@ file's title.  This has the same meaning as in 
`denote-link'."
 
 (defalias 'denote-link-to-existing-or-new-note (symbol-function 
'denote-link-or-create))
 
+;;;###autoload
 (defun denote-link-or-create-with-date ()
+  "Invoke `denote-link-or-create' but also prompt for date.
+
+The date can be in YEAR-MONTH-DAY notation like 2022-06-30 or
+that plus the time: 2022-06-16 14:30.  When the user option
+`denote-date-prompt-use-org-read-date' is non-nil, the date
+prompt uses the more powerful Org+calendar system.
+
+This is the equivalent to calling `denote-link-or-create' when
+`denote-prompts' is set to \\='(date title keywords)."
+  (declare (interactive-only t))
   (interactive)
   (let ((denote-prompts '(date title keywords)))
     (call-interactively #'denote-link-or-create)))
 
+;;;###autoload
+(defun denote-link-or-create-with-type ()
+  "Invoke `denote-link-or-create' but also prompt for file type.
+This is the equivalent to calling `denote-link-or-create' when
+`denote-prompts' is set to \\='(type title keywords)."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(type title keywords)))
+    (call-interactively #'denote-link-or-create)))
+
+;;;###autoload
+(defun denote-link-or-create-with-subdirectory ()
+  "Invoke `denote-link-or-create' but also prompt for subdirectory.
+This is the equivalent to calling `denote-link-or-create' when
+`denote-prompts' is set to \\='(subdirectory title keywords)."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(subdirectory title keywords)))
+    (call-interactively #'denote-link-or-create)))
+
+;;;###autoload
+(defun denote-link-or-create-with-template ()
+  "Invoke `denote-link-or-create' but also prompt for template.
+This is the equivalent to calling `denote-link-or-create' when
+`denote-prompts' is set to \\='(template title keywords).
+
+For templates, refer to `denote-templates'."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(template title keywords)))
+    (call-interactively #'denote-link-or-create)))
+
+;;;###autoload
 (defun denote-open-or-create (target)
+  "Visit file in variable `denote-directory'.
+If file does not exist, invoke `denote' to create a file."
   (interactive (list (denote-file-prompt)))
   (if (file-exists-p target)
       (find-file target)
     (call-interactively #'denote)))
 
+;;;###autoload
 (defun denote-open-or-create-with-date ()
+  "Invoke `denote-link-or-create' but also prompt for date.
+
+The date can be in YEAR-MONTH-DAY notation like 2022-06-30 or
+that plus the time: 2022-06-16 14:30.  When the user option
+`denote-date-prompt-use-org-read-date' is non-nil, the date
+prompt uses the more powerful Org+calendar system.
+
+This is the equivalent to calling `denote-link-or-create' when
+`denote-prompts' is set to \\='(date title keywords)."
+  (declare (interactive-only t))
   (interactive)
   (let ((denote-prompts '(date title keywords)))
     (call-interactively #'denote-open-or-create)))
 
+;;;###autoload
+(defun denote-open-or-create-with-type ()
+  "Invoke `denote-open-or-create' but also prompt for file type.
+This is the equivalent to calling `denote-open-or-create' when
+`denote-prompts' is set to \\='(type title keywords)."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(type title keywords)))
+    (call-interactively #'denote-open-or-create)))
+
+;;;###autoload
+(defun denote-open-or-create-with-subdirectory ()
+  "Invoke `denote-open-or-create' but also prompt for subdirectory.
+This is the equivalent to calling `denote-open-or-create' when
+`denote-prompts' is set to \\='(subdirectory title keywords)."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(subdirectory title keywords)))
+    (call-interactively #'denote-open-or-create)))
+
+;;;###autoload
+(defun denote-open-or-create-with-template ()
+  "Invoke `denote-open-or-create' but also prompt for template.
+This is the equivalent to calling `denote-open-or-create' when
+`denote-prompts' is set to \\='(template title keywords).
+
+For templates, refer to `denote-templates'."
+  (declare (interactive-only t))
+  (interactive)
+  (let ((denote-prompts '(template title keywords)))
+    (call-interactively #'denote-open-or-create)))
+
 ;;;;; Link buttons
 
 ;; Evaluate: (info "(elisp) Button Properties")



reply via email to

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