emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Automatic noexport tag based on rules?


From: John Hendy
Subject: [Orgmode] Re: Automatic noexport tag based on rules?
Date: Fri, 25 Feb 2011 16:37:13 -0600

Reviving this as I can't believe the following solution was overlooked!

On Tue, Feb 8, 2011 at 6:29 PM, John Hendy <address@hidden> wrote:
Hi,


My apologies if this has been discussed. I couldn't find it. I write everything from work in org-mode for several reasons. Primarily, it's my documentation system for research in order to properly document Intellectual Property (IP) information. It's also for todos and contacts. When it comes to exporting my notes into PDF for use in an IP notebook... I dont' want my todos in there.

Is there a way to automatically tag TODOs with :noexport:?


YES! While perusing Bernt Hanson's page (http://doc.norang.ca/org-mode.html#ToDoStateTriggers) I noticed the following:
,-----
I have a few triggers that automatically assign tags to tasks based on 
| state changes. If a task moves to CANCELLED state then it gets a CANCELLED tag.
Moving a CANCELLED task back to TODO removes the CANCELLED tag.
These are used for filtering tasks in agenda views which I'll talk about later.
| ... then he shows the code used to set =org-todo-state-tags-triggers=
`----- 

Sweetness, I thought. In experimenting:
,-----
| (setq org-todo-state-tags-triggers
|      (quote (("TODO" ("noexport" . t)))))
`-----

works perfectly. Well, that is in my 0.2 seconds of experimentation, it worked. New headline -> C-c C-t -> ** TODO whatever :noexport:

I'm a happy camper.  I had resolved to arranging my file with a separate =* Tasks= top level item at the top of each file to store all todos (I may still do this) and then I could just tag the whole headline with :noexport: to keep all the todos out of the export since I'm often typing notes or something and the TODO seems to fit better in the context of the notes rather than having to stuff it into a bucket at the top with TODOs from all kinds of other stuff.. At least if I don't do this, I have some options. Adding a todo in place will keep it from being exported when I print out my reports.

The world is safe again...


Best regards,
John

Or simply add the TODO category to the noexport category altogether?

I haven't turned up anything quite along these lines. One post suggested using "TODO keyword COMMENT" [1], but that just seems to perhaps exclude from export (didn't try) but I know for sure it removes it from agenda view. I want TODOs in agenda but don't want them showing up with my LaTeX export. I typically print out my work to-date each month or so and have to comb through my org file for that month, manually adding :noexport: to my TODOs. Even if I still do this for a few things here and there... it will save me a lot of time.

I suppose I could keep a separate "TODO.org" file, but I really like the process of being able to add them anywhere -- it seems more natural to do that in the flow, particularly in meetings, than to constantly switch buffers or even use remember to keep sending things related to the current topic away to their own island.

I'm 80% confident that the answer is ridiculously simply and I just haven't searched the right thing. Thanks for enlightening me!


Thanks,
John


reply via email to

[Prev in Thread] Current Thread [Next in Thread]