emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Batch exporting a sparse tree
@ 2008-11-28 23:55 Lindsay Todd
  2008-11-29  2:31 ` Lindsay Todd
  0 siblings, 1 reply; 3+ messages in thread
From: Lindsay Todd @ 2008-11-28 23:55 UTC (permalink / raw)
  To: org-mode

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Batch exporting a sparse tree
  2008-11-28 23:55 Batch exporting a sparse tree Lindsay Todd
@ 2008-11-29  2:31 ` Lindsay Todd
  2008-11-30 19:02   ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Lindsay Todd @ 2008-11-29  2:31 UTC (permalink / raw)
  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 <rltodd.ml1@gmail.com> 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?
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: Batch exporting a sparse tree
  2008-11-29  2:31 ` Lindsay Todd
@ 2008-11-30 19:02   ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2008-11-30 19:02 UTC (permalink / raw)
  To: Lindsay Todd; +Cc: org-mode


On Nov 29, 2008, at 3:31 AM, Lindsay Todd wrote:

> 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?

Sure, use `let' to bind org-export-with-tags around the call to org- 
export-visible.

(let ((org-export-with-tags nil)) (org-export-visible ?h nil))

- Carsten

>
>
> /Lindsay
>
>
>
> On Fri, Nov 28, 2008 at 6:55 PM, Lindsay Todd <rltodd.ml1@gmail.com>  
> 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?
>>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-30 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 23:55 Batch exporting a sparse tree Lindsay Todd
2008-11-29  2:31 ` Lindsay Todd
2008-11-30 19:02   ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).