From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Lindsay Todd" Subject: Re: Batch exporting a sparse tree Date: Fri, 28 Nov 2008 21:31:56 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L6Fcm-0001en-RV for emacs-orgmode@gnu.org; Fri, 28 Nov 2008 21:32:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L6Fcl-0001e1-3B for emacs-orgmode@gnu.org; Fri, 28 Nov 2008 21:32:00 -0500 Received: from [199.232.76.173] (port=46138 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6Fck-0001du-OH for emacs-orgmode@gnu.org; Fri, 28 Nov 2008 21:31:58 -0500 Received: from ug-out-1314.google.com ([66.249.92.173]:11969) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L6Fck-0005Kj-Bu for emacs-orgmode@gnu.org; Fri, 28 Nov 2008 21:31:58 -0500 Received: by ug-out-1314.google.com with SMTP id 36so2379957uga.17 for ; Fri, 28 Nov 2008 18:31:56 -0800 (PST) In-Reply-To: Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode To answer my own question, this incantation seems to work: emacs -batch -l ~/.emacs \ -eval '(progn (find-file "~/projects/gtd.org") (org-tags-sparse-tree t "TODO=\"PROJECT\"|TODO=\"MAYBE\"") (org-export-visible ?h nil))' -kill Is there a way to remove tags while doing this export? /Lindsay On Fri, Nov 28, 2008 at 6:55 PM, Lindsay Todd wrote: > I am trying to write a script to extract a sparse tree, selected by > TODO keywords, from my the gtd.org file. The sparse tree should then > be exported to an html file. I am using this command: > > emacs -batch -l ~/.emacs \ > -eval '(find-file "~/projects/gtd.org")' \ > -eval '(org-show-todo-tree "PROJECT|MAYBE")' \ > -eval '(org-export-visible ?h nil)' > > The resulting html file has entries for "PROJECT" and "NEXT"! > Meanwhile, none of my "MAYBE" entries are selected. What might I be > doing wrong? >