branch: externals/denote-journal
commit 4c3f0d16ea640ec06a6078305f6ea49a8d7f48da
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make the denote-journal-calendar-find-file error more precise
---
denote-journal.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/denote-journal.el b/denote-journal.el
index 330cf2ca8a..75e451502a 100644
--- a/denote-journal.el
+++ b/denote-journal.el
@@ -350,13 +350,13 @@ among them."
(interactive nil calendar-mode)
(unless (derived-mode-p 'calendar-mode)
(user-error "Only use this command inside the `calendar'"))
- (if-let* ((calendar-date (calendar-cursor-to-date))
- (files (denote-journal-calendar--date-to-identifier calendar-date))
- (file (if (> (length files) 1)
- (completing-read "Select journal entry: " files nil t)
- (car files))))
- (find-file-other-window file)
- (user-error "No Denote journal entry for this date")))
+ (when-let* ((calendar-date (calendar-cursor-to-date)))
+ (if-let* ((files (denote-journal-calendar--date-to-identifier
calendar-date))
+ (file (if (> (length files) 1)
+ (completing-read "Select journal entry: " files nil t)
+ (car files))))
+ (find-file-other-window file)
+ (user-error "No Denote journal entry for this date"))))
(defun denote-journal-calendar-new-or-existing ()
"Like `denote-journal-new-or-existing-entry' for the `calendar' date at
point."