(bugfix): handle nil file names in `org-roam--org-roam-file-p` (#136)

master
Anthony Cowley 6 years ago committed by GitHub
parent 63754d1ccd
commit 0346d3b16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      org-roam.el

@ -166,8 +166,9 @@ If called interactively, then PARENTS is non-nil."
"Return t if FILE is part of org-roam system, defaulting to the name of the current buffer. Else, return nil."
(let ((path (or file
(buffer-file-name (current-buffer)))))
(f-descendant-of-p (file-truename path)
(file-truename org-roam-directory))))
(and path
(f-descendant-of-p (file-truename path)
(file-truename org-roam-directory)))))
(defun org-roam--get-title-from-cache (file)
"Return title of `FILE' from the cache."

Loading…
Cancel
Save