From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McLean Subject: [PATCH] Fix Org-Collector Error in Global Scope Date: Sat, 24 Mar 2012 09:45:12 -0400 Message-ID: Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBRHW-0004eE-Bn for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 09:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBRHU-0001Er-Kq for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 09:45:21 -0400 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:59182 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBRHU-0001EV-C1 for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 09:45:20 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 5A8848725 for ; Sat, 24 Mar 2012 09:45:15 -0400 (EDT) Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 532068724 for ; Sat, 24 Mar 2012 09:45:15 -0400 (EDT) Received: from macxmcleanm.mclean (unknown [24.129.39.25]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id DEF948723 for ; Sat, 24 Mar 2012 09:45:13 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org When calling Org-Collector with =3D:id global=3D, the call to = =3D(org-narrow-to-subtree)=3D generates an error when the first line of = the org file is not a header. Given that =3D:id global=3D is designed to = use the entire file, the call to =3D(org-narrow-to-subtree)=3D 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