branch: externals/denote-journal
commit 4eaae6f05999a84b7ce4f864881c0cbca7d9ad7a
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Rewrite denote-journal--get-template
---
denote-journal.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/denote-journal.el b/denote-journal.el
index aa106f374a..0e1b61aa37 100644
--- a/denote-journal.el
+++ b/denote-journal.el
@@ -169,13 +169,12 @@ relevant. DATE has the same format as that returned by
`current-time'."
"Return template that has `journal' key in `denote-templates'.
If no template with `journal' key exists but `denote-templates'
is non-nil, prompt the user for a template among
-`denote-templates'. Else return nil.
-
-Also see `denote-journal-new-entry'."
- (if-let* ((template (alist-get 'journal denote-templates)))
- template
- (when denote-templates
- (denote-template-prompt))))
+`denote-templates'. Else return nil."
+ ;; FIXME 2025-04-02: Here we assume that `denote-templates' is an
+ ;; alist. Maybe we need to be more careful.
+ (when denote-templates
+ (or (alist-get 'journal denote-templates)
+ (denote-template-prompt))))
;;;###autoload
(defun denote-journal-new-entry (&optional date)