From e8d3516fa852e309b1224ffbc2563176dd9db0ba Mon Sep 17 00:00:00 2001 From: Gustav Date: Fri, 9 Oct 2020 16:00:58 +0200 Subject: [PATCH] (fix): fix org-roam--extract-ids at outline level 0 (#1174) --- org-roam.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org-roam.el b/org-roam.el index eac7b37..cc2d573 100644 --- a/org-roam.el +++ b/org-roam.el @@ -623,8 +623,9 @@ If FILE-PATH is nil, use the current file." (let (result) ;; We need to handle the special case of the file property drawer (at outline level 0) (org-with-point-at (point-min) - (when-let ((id (org-entry-get nil "ID"))) - (push (vector id file-path (org-outline-level)) result))) + (when-let ((before-first-heading (= 0 (org-outline-level))) + (id (org-entry-get nil "ID"))) + (push (vector id file-path 0) result))) (org-map-region (lambda () (when-let ((id (org-entry-get nil "ID")))