branch: externals/denote-journal commit 6bdf8291feeae99005ed5c48bfb6b67144c6951f Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make sure date is visible before trying to mark it Thanks to Alan Schmitt for reporting the bug in issue 8: <https://github.com/protesilaos/denote-journal/issues/8>. --- README.org | 2 +- denote-journal.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 056c066775..8aad1017bc 100644 --- a/README.org +++ b/README.org @@ -426,7 +426,7 @@ Denote Journal is meant to be a collective effort. Every bit of help matters. + Contributions to code or the manual :: Honza Pokorny, Stefan Monnier, Vineet C. Kulkarni. -+ Ideas and/or user feedback :: Kevin McCarthy. ++ Ideas and/or user feedback :: Alan Schmitt, Kevin McCarthy. * GNU Free Documentation License :PROPERTIES: diff --git a/denote-journal.el b/denote-journal.el index 0e1b61aa37..6ee4bdd7ef 100644 --- a/denote-journal.el +++ b/denote-journal.el @@ -345,7 +345,8 @@ file's title. This has the same meaning as in `denote-link'." (files (denote-journal-calendar--get-files date)) (dates (delq nil (mapcar #'denote-journal-calendar--file-to-date files)))) (dolist (date dates) - (calendar-mark-visible-date date 'denote-journal-calendar)))) + (when (calendar-date-is-visible-p date) + (calendar-mark-visible-date date 'denote-journal-calendar))))) (defun denote-journal-calendar--date-to-time (calendar-date) "Return internal time of `calendar' CALENDAR-DATE.