[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 570ac0eebd 1/6: New utility functions
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 570ac0eebd 1/6: New utility functions |
Date: |
Sun, 18 Sep 2022 08:57:31 -0400 (EDT) |
branch: externals/denote
commit 570ac0eebdbec2c17407a88797b13376e7fe340c
Author: Alan Schmitt <alan.schmitt@polytechnique.org>
Commit: Protesilaos Stavrou <info@protesilaos.com>
New utility functions
- `denote-link-or-create-with-date' is identical to
`denote-link-or-create' with a date prompt in case of creation
- `denote-open-or-create' opens a denote file if it exists, otherwise it
proposes to create it
- `denote-open-or-create-with-date' is identical to
`denote-open-or-create' with a date prompt in case of creation
---
denote.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/denote.el b/denote.el
index 9aec1977fd..a2e1ae12f3 100644
--- a/denote.el
+++ b/denote.el
@@ -2271,6 +2271,22 @@ 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))
+(defun denote-link-or-create-with-date ()
+ (interactive)
+ (let ((denote-prompts '(date title keywords)))
+ (call-interactively #'denote-link-or-create)))
+
+(defun denote-open-or-create (target)
+ (interactive (list (denote-file-prompt)))
+ (if (file-exists-p target)
+ (find-file target)
+ (call-interactively #'denote)))
+
+(defun denote-open-or-create-with-date ()
+ (interactive)
+ (let ((denote-prompts '(date title keywords)))
+ (call-interactively #'denote-open-or-create)))
+
;;;;; Link buttons
;; Evaluate: (info "(elisp) Button Properties")
- [elpa] externals/denote updated (92d85a2ed3 -> 73ffe18348), ELPA Syncer, 2022/09/18
- [elpa] externals/denote 5fedf8eaf6 3/6: Mention Org+calendar date prompt in denote-date, ELPA Syncer, 2022/09/18
- [elpa] externals/denote 2f42ff7bbd 5/6: Reposition some convenience commands, ELPA Syncer, 2022/09/18
- [elpa] externals/denote 67c80d6766 4/6: Expand "link or create", "open or create" commands, ELPA Syncer, 2022/09/18
- [elpa] externals/denote 4c4187ee3a 2/6: Tweak denote-prompts doc string, ELPA Syncer, 2022/09/18
- [elpa] externals/denote 73ffe18348 6/6: Acknowledge Alan Schmitt for commit 570ac0e, ELPA Syncer, 2022/09/18
- [elpa] externals/denote 570ac0eebd 1/6: New utility functions,
ELPA Syncer <=