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

    Use denote-open-link-function instead of hardcoding find-file-other-window
---
 denote-journal.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote-journal.el b/denote-journal.el
index b7501c8c82..420b415aab 100644
--- a/denote-journal.el
+++ b/denote-journal.el
@@ -355,7 +355,7 @@ among them."
               (file (if (> (length files) 1)
                         (completing-read "Select journal entry: " files nil t)
                       (car files))))
-        (find-file-other-window file)
+        (funcall denote-open-link-function file)
       (user-error "No Denote journal entry for this date"))))
 
 (defun denote-journal-calendar-new-or-existing ()
@@ -369,7 +369,7 @@ among them."
         (progn
           (calendar-mark-visible-date calendar-date 'denote-journal-calendar)
           ;; Do not use the same `calendar' window...
-          (cl-letf (((symbol-function #'find-file) #'find-file-other-window))
+          (cl-letf (((symbol-function #'find-file) denote-open-link-function))
             (denote-journal-new-or-existing-entry internal)))
       (user-error "No Denote journal entry for this date"))))
 

Reply via email to