* Re: Automatic noexport tag based on rules?
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-11 8:34 ` Automatic noexport tag based on rules? Carsten Dominik
2011-02-25 22:37 ` John Hendy
2 siblings, 1 reply; 22+ messages in thread
From: Jeff Horn @ 2011-02-09 1:58 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
I'm not handy with emacs-lisp, but perhaps someone could whip up a
handy function that iterates org-refile over each TODO heading to move
it into a new, top-level * Tasks headline?
Then you can tag the tasks headline with :noexport:. This would
destroy the "context", but I find keeping tasks in a separate heading
fine for most of *my* medium sized projects. YMMV.
On Tue, Feb 8, 2011 at 7:29 PM, John Hendy <jw.hendy@gmail.com> 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:?
> 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
>
>
--
Jeffrey Horn
http://www.failuretorefrain.com/jeff/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 1:58 ` Jeff Horn
@ 2011-02-09 2:39 ` John Hendy
2011-02-09 2:53 ` Jeff Horn
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: John Hendy @ 2011-02-09 2:39 UTC (permalink / raw)
To: Jeff Horn; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 3202 bytes --]
On Tue, Feb 8, 2011 at 7:58 PM, Jeff Horn <jrhorn424@gmail.com> wrote:
> I'm not handy with emacs-lisp, but perhaps someone could whip up a
> handy function that iterates org-refile over each TODO heading to move
> it into a new, top-level * Tasks headline?
>
>
Thanks for the suggestion. I'm not a huge fan, but it would get done what I
want to accomplish as far as the export goes.
> Then you can tag the tasks headline with :noexport:. This would
> destroy the "context", but I find keeping tasks in a separate heading
> fine for most of *my* medium sized projects. YMMV.
>
Yeah.. most of my todos aren't medium-sized projects, though. Many of them
are more along the lines of one-liner action items I need to jot to myself
so I don't forget as well as keeping them as a sort of rolling "next
actions" queue. For that reason, I'd much rather keep them in their original
context.
This can't be too hard.
,---
| sed '/[*]* TODO/ s/$/ :noexport:/g'
`---
Or (facetious)
,---
| setq (prefix-for-noexport-custom-variable)
| setq (default-tags-for-no-export-variable)
`---
I just don't know what the elegant, "right" elisp/org method is for
something like this.
John
> On Tue, Feb 8, 2011 at 7:29 PM, John Hendy <jw.hendy@gmail.com> 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:?
> > 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
> >
> >
>
>
>
> --
> Jeffrey Horn
> http://www.failuretorefrain.com/jeff/
>
[-- Attachment #1.2: Type: text/html, Size: 4640 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
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 9:36 ` Automatic noexport tag based on rules? (and a possible bug) Nick Dokos
2 siblings, 0 replies; 22+ messages in thread
From: Jeff Horn @ 2011-02-09 2:53 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
On Tue, Feb 8, 2011 at 9:39 PM, John Hendy <jw.hendy@gmail.com> wrote:
> I just don't know what the elegant, "right" elisp/org method is for
> something like this.
I'll leave that to the experts. ;)
Best wishes.
--
Jeffrey Horn
http://www.failuretorefrain.com/jeff/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
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 18:13 ` Nicolas Goaziou
2011-02-09 9:36 ` Automatic noexport tag based on rules? (and a possible bug) Nick Dokos
2 siblings, 2 replies; 22+ messages in thread
From: Eric S Fraga @ 2011-02-09 7:40 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
John Hendy <jw.hendy@gmail.com> writes:
[...]
> Yeah.. most of my todos aren't medium-sized projects, though. Many of them
> are more along the lines of one-liner action items I need to jot to myself
> so I don't forget as well as keeping them as a sort of rolling "next
> actions" queue. For that reason, I'd much rather keep them in their original
> context.
On possible suggestion: if you use inline tasks for these one liner
TODOs,
,----
| C-c C-x t runs the command org-inlinetask-insert-task, which is an
| interactive compiled Lisp function in `org-inlinetask.el'.
|
| It is bound to C-c C-x t.
|
| (org-inlinetask-insert-task &optional NO-STATE)
|
| Insert an inline task.
| If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
`----
You can then customise =org-inlinetask-export-templates= to
generate latex code that basically ignores the inline task.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.324.gca7a)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
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
1 sibling, 1 reply; 22+ messages in thread
From: John Hendy @ 2011-02-09 15:18 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1502 bytes --]
On Wed, Feb 9, 2011 at 1:40 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
> [...]
>
> > Yeah.. most of my todos aren't medium-sized projects, though. Many of
> them
> > are more along the lines of one-liner action items I need to jot to
> myself
> > so I don't forget as well as keeping them as a sort of rolling "next
> > actions" queue. For that reason, I'd much rather keep them in their
> original
> > context.
>
> On possible suggestion: if you use inline tasks for these one liner
> TODOs,
>
>
Perhaps that's the way to go. I just find them ugly :(
> ,----
> | C-c C-x t runs the command org-inlinetask-insert-task, which is an
> | interactive compiled Lisp function in `org-inlinetask.el'.
> |
> | It is bound to C-c C-x t.
> |
> | (org-inlinetask-insert-task &optional NO-STATE)
> |
> | Insert an inline task.
> | If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
> `----
>
>
This isn't working for me and it's been quite difficult to find mention of
inline tasks in documentation. My searching only pulls a mention from the
6.29v list of visible changes: http://orgmode.org/Changes_old.html#sec-1_1_6
Is there something I need to set up to get this working?
Thanks,
John
> You can then customise =org-inlinetask-export-templates= to
> generate latex code that basically ignores the inline task.
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>
[-- Attachment #1.2: Type: text/html, Size: 2477 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 15:18 ` John Hendy
@ 2011-02-09 16:58 ` John Hendy
0 siblings, 0 replies; 22+ messages in thread
From: John Hendy @ 2011-02-09 16:58 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1717 bytes --]
Nevermind. Once I located 'org-inlinetask.el' the answer was clear.
John
On Wed, Feb 9, 2011 at 9:18 AM, John Hendy <jw.hendy@gmail.com> wrote:
> On Wed, Feb 9, 2011 at 1:40 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
>> John Hendy <jw.hendy@gmail.com> writes:
>>
>> [...]
>>
>> > Yeah.. most of my todos aren't medium-sized projects, though. Many of
>> them
>> > are more along the lines of one-liner action items I need to jot to
>> myself
>> > so I don't forget as well as keeping them as a sort of rolling "next
>> > actions" queue. For that reason, I'd much rather keep them in their
>> original
>> > context.
>>
>> On possible suggestion: if you use inline tasks for these one liner
>> TODOs,
>>
>>
> Perhaps that's the way to go. I just find them ugly :(
>
>
>> ,----
>> | C-c C-x t runs the command org-inlinetask-insert-task, which is an
>> | interactive compiled Lisp function in `org-inlinetask.el'.
>> |
>> | It is bound to C-c C-x t.
>> |
>> | (org-inlinetask-insert-task &optional NO-STATE)
>> |
>> | Insert an inline task.
>> | If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
>> `----
>>
>>
> This isn't working for me and it's been quite difficult to find mention of
> inline tasks in documentation. My searching only pulls a mention from the
> 6.29v list of visible changes:
> http://orgmode.org/Changes_old.html#sec-1_1_6
>
> Is there something I need to set up to get this working?
>
>
> Thanks,
> John
>
>
>> You can then customise =org-inlinetask-export-templates= to
>> generate latex code that basically ignores the inline task.
>>
>> --
>> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
>> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>>
>
>
[-- Attachment #1.2: Type: text/html, Size: 2942 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 7:40 ` Eric S Fraga
2011-02-09 15:18 ` John Hendy
@ 2011-02-09 18:13 ` Nicolas Goaziou
2011-02-09 18:46 ` John Hendy
1 sibling, 1 reply; 22+ messages in thread
From: Nicolas Goaziou @ 2011-02-09 18:13 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode
Hello,
>>>>> Eric S Fraga writes:
> You can then customise =org-inlinetask-export-templates= to generate
> latex code that basically ignores the inline task.
For the record, if the goal is to completely ignore inline tasks upon
exporting, you should set org-inlinetask-export to nil instead of
modifying org-inlinetask-export-templates.
Regards,
--
Nicolas
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 18:13 ` Nicolas Goaziou
@ 2011-02-09 18:46 ` John Hendy
0 siblings, 0 replies; 22+ messages in thread
From: John Hendy @ 2011-02-09 18:46 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 624 bytes --]
On Wed, Feb 9, 2011 at 12:13 PM, Nicolas Goaziou <n.goaziou@gmail.com>wrote:
> Hello,
>
> >>>>> Eric S Fraga writes:
> > You can then customise =org-inlinetask-export-templates= to generate
> > latex code that basically ignores the inline task.
>
> For the record, if the goal is to completely ignore inline tasks upon
> exporting, you should set org-inlinetask-export to nil instead of
> modifying org-inlinetask-export-templates.
>
>
Yes -- I read org-inlinetask.el and saw this setting in the preamble. I
added
,---
| (setq org-inlinetask-export nil)
`---
to .emacs and it works.
John
> Regards,
>
> --
> Nicolas
>
[-- Attachment #1.2: Type: text/html, Size: 1212 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules? (and a possible bug)
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 9:36 ` Nick Dokos
2 siblings, 0 replies; 22+ messages in thread
From: Nick Dokos @ 2011-02-09 9:36 UTC (permalink / raw)
To: John Hendy; +Cc: Jeff Horn, emacs-orgmode, nicholas.dokos
John Hendy <jw.hendy@gmail.com> wrote:
> Yeah.. most of my todos aren't medium-sized projects, though. Many of them
> are more along the lines of one-liner action items I need to jot to myself
> so I don't forget as well as keeping them as a sort of rolling "next
> actions" queue. For that reason, I'd much rather keep them in their original
> context.
>
> This can't be too hard.
>
> ,---
> | sed '/[*]* TODO/ s/$/ :noexport:/g'
> `---
>
That's perfectly workable[fn:1].
> Or (facetious)
>
> ,---
> | setq (prefix-for-noexport-custom-variable)
> | setq (default-tags-for-no-export-variable)
> `---
>
This isn't ;-)
> I just don't know what the elegant, "right" elisp/org method is for
> something like this.
>
Eye of the beholder and all that. Here's my attempt which should work,
except I think there is a bug in org-change-tag-in-region (see below):
--8<---------------cut here---------------start------------->8---
(defun set-noexport ()
(org-change-tag-in-region (save-excursion (beginning-of-line) (point)) (save-excursion (end-of-line) (point)) "noexport" nil))
(defun jh-mark-todo-noexport ()
(org-map-entries 'set-noexport "/+TODO" 'file))
--8<---------------cut here---------------end--------------->8---
There might be a simpler way to set the tag, but if so, I didn't find it.
OTOH, mapping over the entries is as elegant as it gets.
Now for the (purported) bug: org-change-tag-in-region does the following
,----
| ...
| (goto-char end)
| (setq l2 (1- (org-current-line)))
| (goto-char beg)
| (setq l1 (org-current-line))
| (loop for l from l1 to l2 do
| ...
`----
so if the region is a single line (say line 3), l2 becomes 2, l1 becomes 3
and the loop is not executed at all, whereas methinks it should be executed once.
Shouldn't l2 be set to (org-current-line)?
Thanks,
Nick
Footnotes:
[fn:1] ...except that you might not want to add the tag if it's there already -
I'm not sure whether that would cause a problem.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 0:29 Automatic noexport tag based on rules? John Hendy
2011-02-09 1:58 ` Jeff Horn
@ 2011-02-11 8:34 ` Carsten Dominik
2011-02-11 15:33 ` John Hendy
2011-02-25 22:37 ` John Hendy
2 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2011-02-11 8:34 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-11 8:34 ` Automatic noexport tag based on rules? Carsten Dominik
@ 2011-02-11 15:33 ` John Hendy
0 siblings, 0 replies; 22+ messages in thread
From: John Hendy @ 2011-02-11 15:33 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
[-- 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Automatic noexport tag based on rules?
2011-02-09 0:29 Automatic noexport tag based on rules? John Hendy
2011-02-09 1:58 ` Jeff Horn
2011-02-11 8:34 ` Automatic noexport tag based on rules? Carsten Dominik
@ 2011-02-25 22:37 ` John Hendy
2011-03-27 19:37 ` [Orgmode] " Samuel Wales
2 siblings, 1 reply; 22+ messages in thread
From: John Hendy @ 2011-02-25 22:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 3176 bytes --]
Reviving this as I can't believe the following solution was overlooked!
On Tue, Feb 8, 2011 at 6:29 PM, John Hendy <jw.hendy@gmail.com> 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
>
[-- Attachment #1.2: Type: text/html, Size: 5598 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-02-25 22:37 ` John Hendy
@ 2011-03-27 19:37 ` Samuel Wales
2011-03-27 20:10 ` John Hendy
0 siblings, 1 reply; 22+ messages in thread
From: Samuel Wales @ 2011-03-27 19:37 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
That is indeed an excellent solution if you want to add a tag for a
todo kw. However, I wonder if there is a direct approach, where the
exporter simply does not export if it is a certain todo kw. Is the
solution to have the exporter delete anything with that todo kw? Or
is there a way to have it skip?
One advantage of this approach is that there might be a lot of
contexts in which you don't need the noexport tag.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-27 19:37 ` [Orgmode] " Samuel Wales
@ 2011-03-27 20:10 ` John Hendy
2011-03-29 18:40 ` Matt Lundin
0 siblings, 1 reply; 22+ messages in thread
From: John Hendy @ 2011-03-27 20:10 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
On Sun, Mar 27, 2011 at 2:37 PM, Samuel Wales <samologist@gmail.com> wrote:
> That is indeed an excellent solution if you want to add a tag for a
> todo kw. However, I wonder if there is a direct approach, where the
> exporter simply does not export if it is a certain todo kw. Is the
> solution to have the exporter delete anything with that todo kw? Or
> is there a way to have it skip?
I think that was Carsten's suggestion a bit back, but I'm not sure. I
think I asked if it was just deleting as it channeled through the
export function but didn't get a response. Looking back, though, I'm
sure that's what it was and my question was probably a bit silly :)
And yes, I have turned this off as I find adding :noexport: to ever
todo in addition to whatever tags I already use to ID the project/task
is annoying and ugly. I've toyed with simply having a * Tracking
headline at the beginning of each file where I dump todos via capture
and track time and then having that have a top level noexport tag to
take care of things. That's pretty much nice, but I still like todos
created during meeting minutes or in the context of some other project
notes to stay where they make sense rather than separating them from
their location and putting them elsewhere.
So.... I've got some solutions but am not quite happy yet. I should
re-visit Carsten's solution to strip it on export. That would probably
be the ticket.
I happen to hate how inline tasks look. That's just me, though!
>
> One advantage of this approach is that there might be a lot of
> contexts in which you don't need the noexport tag.
>
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-27 20:10 ` John Hendy
@ 2011-03-29 18:40 ` Matt Lundin
2011-03-29 21:05 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: Matt Lundin @ 2011-03-29 18:40 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
John Hendy <jw.hendy@gmail.com> writes:
> On Sun, Mar 27, 2011 at 2:37 PM, Samuel Wales <samologist@gmail.com> wrote:
>> That is indeed an excellent solution if you want to add a tag for a
>> todo kw. However, I wonder if there is a direct approach, where the
>> exporter simply does not export if it is a certain todo kw. Is the
>> solution to have the exporter delete anything with that todo kw? Or
>> is there a way to have it skip?
>
> I think that was Carsten's suggestion a bit back, but I'm not sure. I
> think I asked if it was just deleting as it channeled through the
> export function but didn't get a response. Looking back, though, I'm
> sure that's what it was and my question was probably a bit silly :)
You are correct. The export hook that Carsten provided deletes items in
a temporary buffer, not in your org files. In fact, you can use the
export hooks to do almost anything to this temporary buffers before they
are exported; your original org files will not be touched.
> And yes, I have turned this off as I find adding :noexport: to ever
> todo in addition to whatever tags I already use to ID the project/task
> is annoying and ugly. I've toyed with simply having a * Tracking
> headline at the beginning of each file where I dump todos via capture
> and track time and then having that have a top level noexport tag to
> take care of things. That's pretty much nice, but I still like todos
> created during meeting minutes or in the context of some other project
> notes to stay where they make sense rather than separating them from
> their location and putting them elsewhere.
>
> So.... I've got some solutions but am not quite happy yet. I should
> re-visit Carsten's solution to strip it on export. That would probably
> be the ticket.
Yes, that would be the easiest solution, requiring no additional
markup.
Best,
Matt
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 18:40 ` Matt Lundin
@ 2011-03-29 21:05 ` Carsten Dominik
2011-03-29 21:15 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2011-03-29 21:05 UTC (permalink / raw)
To: Matt Lundin; +Cc: emacs-orgmode
On 29.3.2011, at 20:40, Matt Lundin wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
>> On Sun, Mar 27, 2011 at 2:37 PM, Samuel Wales <samologist@gmail.com> wrote:
>>> That is indeed an excellent solution if you want to add a tag for a
>>> todo kw. However, I wonder if there is a direct approach, where the
>>> exporter simply does not export if it is a certain todo kw. Is the
>>> solution to have the exporter delete anything with that todo kw? Or
>>> is there a way to have it skip?
>>
>> I think that was Carsten's suggestion a bit back, but I'm not sure. I
>> think I asked if it was just deleting as it channeled through the
>> export function but didn't get a response. Looking back, though, I'm
>> sure that's what it was and my question was probably a bit silly :)
>
> You are correct. The export hook that Carsten provided deletes items in
> a temporary buffer, not in your org files. In fact, you can use the
> export hooks to do almost anything to this temporary buffers before they
> are exported; your original org files will not be touched.
>
>> And yes, I have turned this off as I find adding :noexport: to ever
>> todo in addition to whatever tags I already use to ID the project/task
>> is annoying and ugly. I've toyed with simply having a * Tracking
>> headline at the beginning of each file where I dump todos via capture
>> and track time and then having that have a top level noexport tag to
>> take care of things. That's pretty much nice, but I still like todos
>> created during meeting minutes or in the context of some other project
>> notes to stay where they make sense rather than separating them from
>> their location and putting them elsewhere.
>>
>> So.... I've got some solutions but am not quite happy yet. I should
>> re-visit Carsten's solution to strip it on export. That would probably
>> be the ticket.
>
> Yes, that would be the easiest solution, requiring no additional
> markup.
I have a good patch for this lined up - will check it in tomorrow.
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 21:05 ` Carsten Dominik
@ 2011-03-29 21:15 ` Carsten Dominik
2011-03-29 21:48 ` John Hendy
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2011-03-29 21:15 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode
On 29.3.2011, at 23:05, Carsten Dominik wrote:
>
> On 29.3.2011, at 20:40, Matt Lundin wrote:
>
>> John Hendy <jw.hendy@gmail.com> writes:
>>
>>> On Sun, Mar 27, 2011 at 2:37 PM, Samuel Wales <samologist@gmail.com> wrote:
>>>> That is indeed an excellent solution if you want to add a tag for a
>>>> todo kw. However, I wonder if there is a direct approach, where the
>>>> exporter simply does not export if it is a certain todo kw. Is the
>>>> solution to have the exporter delete anything with that todo kw? Or
>>>> is there a way to have it skip?
>>>
>>> I think that was Carsten's suggestion a bit back, but I'm not sure. I
>>> think I asked if it was just deleting as it channeled through the
>>> export function but didn't get a response. Looking back, though, I'm
>>> sure that's what it was and my question was probably a bit silly :)
>>
>> You are correct. The export hook that Carsten provided deletes items in
>> a temporary buffer, not in your org files. In fact, you can use the
>> export hooks to do almost anything to this temporary buffers before they
>> are exported; your original org files will not be touched.
>>
>>> And yes, I have turned this off as I find adding :noexport: to ever
>>> todo in addition to whatever tags I already use to ID the project/task
>>> is annoying and ugly. I've toyed with simply having a * Tracking
>>> headline at the beginning of each file where I dump todos via capture
>>> and track time and then having that have a top level noexport tag to
>>> take care of things. That's pretty much nice, but I still like todos
>>> created during meeting minutes or in the context of some other project
>>> notes to stay where they make sense rather than separating them from
>>> their location and putting them elsewhere.
>>>
>>> So.... I've got some solutions but am not quite happy yet. I should
>>> re-visit Carsten's solution to strip it on export. That would probably
>>> be the ticket.
>>
>> Yes, that would be the easiest solution, requiring no additional
>> markup.
>
> I have a good patch for this lined up - will check it in tomorrow.
In fact, I just now pushed it.
To export without DONE tasks, use
#+OPTION: donetasks:nil
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 21:15 ` Carsten Dominik
@ 2011-03-29 21:48 ` John Hendy
2011-03-29 22:49 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: John Hendy @ 2011-03-29 21:48 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode
On Tue, Mar 29, 2011 at 4:15 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On 29.3.2011, at 23:05, Carsten Dominik wrote:
>
>>
>> On 29.3.2011, at 20:40, Matt Lundin wrote:
>>
>>> John Hendy <jw.hendy@gmail.com> writes:
>>>
>>
>> I have a good patch for this lined up - will check it in tomorrow.
>
> In fact, I just now pushed it.
>
> To export without DONE tasks, use
>
> #+OPTION: donetasks:nil
>
> - Carsten
Thanks! Not to be all annoying... but how hard would this be?
,---
| #+OPTION: tasks:nil
`---
I don't ever export *any* tasks since it's always my work notes -- I
have to keep good records for Intellectual Property purposes and my
todos are never pertinent. Perhaps users would find both of these
options helpful?
John
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 21:48 ` John Hendy
@ 2011-03-29 22:49 ` Carsten Dominik
2011-03-29 22:50 ` John Hendy
0 siblings, 1 reply; 22+ messages in thread
From: Carsten Dominik @ 2011-03-29 22:49 UTC (permalink / raw)
To: John Hendy; +Cc: Matt Lundin, emacs-orgmode
On 29.3.2011, at 23:48, John Hendy wrote:
> On Tue, Mar 29, 2011 at 4:15 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>>
>> On 29.3.2011, at 23:05, Carsten Dominik wrote:
>>
>>>
>>> On 29.3.2011, at 20:40, Matt Lundin wrote:
>>>
>>>> John Hendy <jw.hendy@gmail.com> writes:
>>>>
>>>
>>> I have a good patch for this lined up - will check it in tomorrow.
>>
>> In fact, I just now pushed it.
>>
>> To export without DONE tasks, use
>>
>> #+OPTION: donetasks:nil
>>
>> - Carsten
>
> Thanks! Not to be all annoying... but how hard would this be?
Not hard at all. It is done.
- Carsten
>
> ,---
> | #+OPTION: tasks:nil
> `---
>
> I don't ever export *any* tasks since it's always my work notes -- I
> have to keep good records for Intellectual Property purposes and my
> todos are never pertinent. Perhaps users would find both of these
> options helpful?
>
>
> John
>
>>
>>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 22:49 ` Carsten Dominik
@ 2011-03-29 22:50 ` John Hendy
2011-03-30 3:30 ` Carsten Dominik
0 siblings, 1 reply; 22+ messages in thread
From: John Hendy @ 2011-03-29 22:50 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode
On Tue, Mar 29, 2011 at 5:49 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On 29.3.2011, at 23:48, John Hendy wrote:
>
>> On Tue, Mar 29, 2011 at 4:15 PM, Carsten Dominik
>> <carsten.dominik@gmail.com> wrote:
>>>
>>> On 29.3.2011, at 23:05, Carsten Dominik wrote:
>>>
>>>>
>>>> On 29.3.2011, at 20:40, Matt Lundin wrote:
>>>>
>>>>> John Hendy <jw.hendy@gmail.com> writes:
>>>>>
>>>>
>>>> I have a good patch for this lined up - will check it in tomorrow.
>>>
>>> In fact, I just now pushed it.
>>>
>>> To export without DONE tasks, use
>>>
>>> #+OPTION: donetasks:nil
>>>
>>> - Carsten
>>
>> Thanks! Not to be all annoying... but how hard would this be?
>
> Not hard at all. It is done.
>
1) I figured it probably wasn't hard, but just asked politely anyway :)
2) Thanks a ton. This is fantastic.
John
> - Carsten
>
>>
>> ,---
>> | #+OPTION: tasks:nil
>> `---
>>
>> I don't ever export *any* tasks since it's always my work notes -- I
>> have to keep good records for Intellectual Property purposes and my
>> todos are never pertinent. Perhaps users would find both of these
>> options helpful?
>>
>>
>> John
>>
>>>
>>>
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Orgmode] Re: Automatic noexport tag based on rules?
2011-03-29 22:50 ` John Hendy
@ 2011-03-30 3:30 ` Carsten Dominik
0 siblings, 0 replies; 22+ messages in thread
From: Carsten Dominik @ 2011-03-30 3:30 UTC (permalink / raw)
To: John Hendy; +Cc: Matt Lundin, emacs-orgmode
On 30.3.2011, at 00:50, John Hendy wrote:
> On Tue, Mar 29, 2011 at 5:49 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>>
>> On 29.3.2011, at 23:48, John Hendy wrote:
>>
>>> On Tue, Mar 29, 2011 at 4:15 PM, Carsten Dominik
>>> <carsten.dominik@gmail.com> wrote:
>>>>
>>>> On 29.3.2011, at 23:05, Carsten Dominik wrote:
>>>>
>>>>>
>>>>> On 29.3.2011, at 20:40, Matt Lundin wrote:
>>>>>
>>>>>> John Hendy <jw.hendy@gmail.com> writes:
>>>>>>
>>>>>
>>>>> I have a good patch for this lined up - will check it in tomorrow.
>>>>
>>>> In fact, I just now pushed it.
>>>>
>>>> To export without DONE tasks, use
>>>>
>>>> #+OPTION: donetasks:nil
>>>>
>>>> - Carsten
>>>
>>> Thanks! Not to be all annoying... but how hard would this be?
>>
>> Not hard at all. It is done.
>>
>
> 1) I figured it probably wasn't hard, but just asked politely anyway :)
> 2) Thanks a ton. This is fantastic.
I was to fast, the implementations was not good. Now there is only
one variable, org-export-with-tasks. It can be nil to remove all tasks,
`todo' to remove the DONE tasks, or a list of tasks to keep for export.
For example
#+OPTIONS: tasks:todo
or
#+OPTIONS: tasks:("TODO" "WAITING")
I think this is much cleaner.
- Carsten
^ permalink raw reply [flat|nested] 22+ messages in thread