branch: externals/denote-journal
commit 247696eb5d96148f422bc14a1f29d36687b4567a
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Write FIXME about getting only the files within the visible portion of the 
calendar
---
 denote-journal.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/denote-journal.el b/denote-journal.el
index 6e849a85a4..5b71d6b74d 100644
--- a/denote-journal.el
+++ b/denote-journal.el
@@ -298,13 +298,18 @@ Return (MONTH DAY YEAR) or nil if not an Org time-string."
     (pcase-let ((`(,year ,month ,day) numbers))
       (list month day year))))
 
+;; FIXME 2025-03-31: Only get files that are within the visible
+;; calendar range.  We have the building block for finding this in
+;; `calendar-date-is-visible-p'.  Though we need to be careful to also
+;; get the year when it changes.  The idea is to write the range as a
+;; regexp to pass to `denote-directory-files', like:
+;;
+;; (concat "20250[2-4].*" (denote-journal--keyword-regex)).
 (defun denote-journal-calendar--get-files ()
   "Return list of files matching variable `denote-journal-keyword'."
   (let ((denote-directory (denote-journal-directory)))
     (denote-directory-files (denote-journal--keyword-regex))))
 
-;; TODO 2025-03-31: Can we know the range of visible dates in the
-;; calendar?  Then we can only ask for those files.
 (defun denote-journal-calendar--get-files-as-dates ()
   "Return list of files as dates in the form of (MONTH DAY YEAR)."
   (when-let* ((files (denote-journal-calendar--get-files)))

Reply via email to