mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
(bugfix): add workaround for undocumented file-truename
behavior (#470)
This prevents and error being generated when the agenda is displayed. Fixes #408
This commit is contained in:
10
org-roam.el
10
org-roam.el
@ -163,12 +163,12 @@ Like `file-name-extension', but does not strip version number."
|
|||||||
(defun org-roam--org-roam-file-p (&optional file)
|
(defun org-roam--org-roam-file-p (&optional file)
|
||||||
"Return t if FILE is part of Org-roam system, nil otherwise.
|
"Return t if FILE is part of Org-roam system, nil otherwise.
|
||||||
If FILE is not specified, use the current buffer's file-path."
|
If FILE is not specified, use the current buffer's file-path."
|
||||||
(let ((path (or file
|
(if-let ((path (or file
|
||||||
(buffer-file-name))))
|
(buffer-file-name))))
|
||||||
(and path
|
(save-match-data
|
||||||
(org-roam--org-file-p path)
|
(org-roam--org-file-p path)
|
||||||
(f-descendant-of-p (file-truename path)
|
(f-descendant-of-p (file-truename path)
|
||||||
(file-truename org-roam-directory)))))
|
(file-truename org-roam-directory)))))
|
||||||
|
|
||||||
(defun org-roam--list-files (dir)
|
(defun org-roam--list-files (dir)
|
||||||
"Return all Org-roam files located within DIR, at any nesting level.
|
"Return all Org-roam files located within DIR, at any nesting level.
|
||||||
|
Reference in New Issue
Block a user