diff options
-rw-r--r-- | lib/org/jao-org-links.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/org/jao-org-links.el b/lib/org/jao-org-links.el index 019d26b..2882f7a 100644 --- a/lib/org/jao-org-links.el +++ b/lib/org/jao-org-links.el @@ -1,4 +1,4 @@ --*- lexical-binding: t; -*- +;; -*- lexical-binding: t; -*- (require 'jao-org-utils) (require 'jao-maildir) @@ -135,6 +135,9 @@ (let* ((file-name (or file-name buffer-file-name)) (bn (file-name-base file-name)) (rx (format "%s\\.org$" (regexp-quote bn)))) + (save-some-buffers nil + (lambda () + (string-prefix-p jao-org-notes-dir buffer-file-name))) (or (car (directory-files-recursively jao-org-notes-dir rx)) (let* ((dirs (seq-difference (directory-files jao-org-notes-dir) '("." ".." "attic"))) |