From b8ab60db605809230c1cfaab978f5f0117d9f26d Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Mon, 5 Feb 2024 03:36:51 +0300 Subject: [PATCH 1/2] Account for org-extend-today-until in org-journal-open-current-file --- org-journal.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-journal.el b/org-journal.el index 9bbec04..3bb0809 100644 --- a/org-journal.el +++ b/org-journal.el @@ -1266,7 +1266,8 @@ If NO-SELECT is non-nil, open it, but don't show it." (defun org-journal-open-current-journal-file () "Open the current journal file" (interactive) - (let ((org-journal-file (org-journal--get-entry-path))) + (let ((org-journal-file (org-journal--get-entry-path + (time-since (* 3600 org-extend-today-until))))) (if (file-exists-p org-journal-file) (progn (funcall org-journal-find-file org-journal-file) From 129dede1a0c61e0fd914ed9b9aed2baab831ee7c Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sat, 10 Feb 2024 13:30:51 +0300 Subject: [PATCH 2/2] Use time-subtract instead of time-since for clarity --- org-journal.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-journal.el b/org-journal.el index 3bb0809..98eead5 100644 --- a/org-journal.el +++ b/org-journal.el @@ -1267,7 +1267,8 @@ If NO-SELECT is non-nil, open it, but don't show it." "Open the current journal file" (interactive) (let ((org-journal-file (org-journal--get-entry-path - (time-since (* 3600 org-extend-today-until))))) + (time-subtract (current-time) + (* 3600 org-extend-today-until))))) (if (file-exists-p org-journal-file) (progn (funcall org-journal-find-file org-journal-file)