emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Automatic noexport tag based on rules?
Date: Fri, 11 Feb 2011 09:33:25 -0600	[thread overview]
Message-ID: <AANLkTimNHd_qXtkxhK_LUbsgFC36MO88t-ZiewvGTV_A@mail.gmail.com> (raw)
In-Reply-To: <B436915C-A12D-4FD0-A1BA-09C50630D46A@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2822 bytes --]

On Fri, Feb 11, 2011 at 2:34 AM, Carsten Dominik
<carsten.dominik@gmail.com>wrote:

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


And this physically removes the TODOs from the "blob" being exported, not
from my .org files, right? If so, perhaps that would be an option. Strip it
from the stream headed for export.

Thanks for giving the code.


John


> 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.
>
>
> - 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.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3856 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2011-02-11 15:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  0:29 Automatic noexport tag based on rules? John Hendy
2011-02-09  1:58 ` Jeff Horn
2011-02-09  2:39   ` John Hendy
2011-02-09  2:53     ` Jeff Horn
2011-02-09  7:40     ` Eric S Fraga
2011-02-09 15:18       ` John Hendy
2011-02-09 16:58         ` John Hendy
2011-02-09 18:13       ` Nicolas Goaziou
2011-02-09 18:46         ` John Hendy
2011-02-09  9:36     ` Automatic noexport tag based on rules? (and a possible bug) Nick Dokos
2011-02-11  8:34 ` Automatic noexport tag based on rules? Carsten Dominik
2011-02-11 15:33   ` John Hendy [this message]
2011-02-25 22:37 ` John Hendy
2011-03-27 19:37   ` [Orgmode] " Samuel Wales
2011-03-27 20:10     ` John Hendy
2011-03-29 18:40       ` Matt Lundin
2011-03-29 21:05         ` Carsten Dominik
2011-03-29 21:15           ` Carsten Dominik
2011-03-29 21:48             ` John Hendy
2011-03-29 22:49               ` Carsten Dominik
2011-03-29 22:50                 ` John Hendy
2011-03-30  3:30                   ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimNHd_qXtkxhK_LUbsgFC36MO88t-ZiewvGTV_A@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).