From 3f2d42142c0111f3ed4022983de8cad88f96fc60 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Thu, 29 Jul 2021 11:15:14 +0800 Subject: [PATCH] (fix)org-roam-id-at-point: ignore top-level excluded nodes (#1704) Previously if a top-level file node is excluded, it would still be picked up by org-roam-id-at-point. This adds another org-roam-db-node-p check before returning an ID, fixing the broken behaviour. Fixes #1635. --- org-roam.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-roam.el b/org-roam.el index ae182fd..683f2d3 100644 --- a/org-roam.el +++ b/org-roam.el @@ -151,7 +151,8 @@ first encapsulating ID." (while (and (not (org-roam-db-node-p)) (not (bobp))) (org-roam-up-heading-or-point-min)) - (org-id-get))) + (when (org-roam-db-node-p) + (org-id-get)))) ;;;; File functions and predicates (defun org-roam--file-name-extension (filename)