When calling Org-Collector with =:id global=, the call to =(org-narrow-to-subtree)= generates an error when the first line of the org file is not a header. Given that =:id global= is designed to use the entire file, the call to =(org-narrow-to-subtree)= is not even necessary. This patch skips it for global scope collector calls.
This is a TINYCHANGE Mike Modified contrib/lisp/org-collector.el diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el index ad198ed..eac97f9 100644 --- a/contrib/lisp/org-collector.el +++ b/contrib/lisp/org-collector.el @@ -131,7 +131,8 @@ preceeding the dblock, then update the contents of the dblock." ((setq idpos (org-find-entry-with-id id)) (goto-char idpos)) (t (error "Cannot find entry with :ID: %s" id)))) - (org-narrow-to-subtree) + (unless (equal id 'global) + (org-narrow-to-subtree)) (setq stringformat (if noquote "%s" "%S")) (setq table (org-propview-to-table (org-propview-collect cols stringformat conds match scope inherit