emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Carsten Dominik
Subject: Re: [Orgmode] Automatic noexport tag based on rules?
Date: Fri, 11 Feb 2011 09:34:26 +0100


On Feb 9, 2011, at 1:29 AM, John Hendy 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:?


An alternative to using the :noexport: tag, and also to
the other suggestions given here in this thread would
be to use `org-map-entries' to physically remove all
subtrees which match your condition.  You can call the
mapper from one of the preprocessing hooks:

(defun my-export-remove-TODO ()
 (org-map-entries
  ;; The following form will be evaluated at each matching tree
  '(progn
     (outline-mark-subtree)          ; mark tree
     (delete-region (point) (mark))) ; remove it
  ;; Now the tags/property/todo matcher to select trees
  "LEVEL<15+TODO={.}"
  ))

;; Call this after other tree selection has been processed
(add-hook 'org-export-preprocess-after-tree-selection-hook
          'my-export-remove-TODO)

The matcher includes a LEVEL<15 test to make sure this will
not mess with inline tasks.

Export preprocessor hooks are a good place for such tasks.
Also Nick's proposal could be used in such a hook, but not
the same hook as I have used above.  Maybe in
org-export-preprocessor-after-include-files-hook.

Nick, an easy way to set a particular tag is

(org-toggle-tag "noexport" 'on)

The line number stuff  in org-change-tag-in-region is there
to allow people to have point in the line *after* the last
headline to change.  But maybe you can fix this by making
a special case for point and mark in the same line...

- Carsten






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
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




reply via email to

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