From 876f6f29d41109c8aa9bdb95f535cbc447d57ab2 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Fri, 12 Mar 2021 19:49:12 +0530 Subject: [PATCH] Fix: missing-id-error: Fetch entry-name only when entry is non-nil Partly fixes the problem where changing local parents always causes a backtrace. The rest of the puzzle is understanding why some entry is passed as nil to these functions and correctly handling nil entries in various org-brain functions. --- org-brain.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-brain.el b/org-brain.el index b4aeaee..8f582f1 100644 --- a/org-brain.el +++ b/org-brain.el @@ -1033,7 +1033,7 @@ Only works on headline entries." (defun org-brain--missing-id-error (entry) "Error message to be shown if id of ENTRY isn't found by `org-id-find'." (error "Couldn't find entry %s, try running org-brain-update-id-locations. " - (org-brain-entry-name entry))) + (when entry (org-brain-entry-name entry)))) (defun org-brain-entry-marker (entry) "Get marker to ENTRY."