emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* when export org-mode to html, don't export entries of TODO, CANCELED
@ 2011-11-18  0:22 filebat Mark
  2011-11-18  1:46 ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: filebat Mark @ 2011-11-18  0:22 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Denny Zhang

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

hi emacsers

Exporting org-mode's entries to html is a fantastic way for knowledge sharing!

Usually entries of "TODO" "HALF" "DELEGATE" "CANCELED" "DEFERRED" are
incomplete/immature knowledge.
Thus, I don't want to export them. Furthermore, after they are marked
as "DONE", I'd like to export them.

Any idea for how to do this?
Note that org-export-exclude-tags doesn't help us, at my first glance.

Draft solution:
After checking the implementation of org-mode for this part, I found
org-export-handle-export-tags function.
It determines what to be excluded when exporting, by search regexp of
:\\(TAG1\\|TAG2\\|...\\): in entries' title.

Thus I override org-export-handle-export-tags, by search regexp of
\\(TAG1\\|TAG2\\|...\\) with leading/tailing colon removed.

It's ugly but it works.
So my open question is what's the better solution?

http://hi.baidu.com/filebat/blog/item/6406a9fd6f79fd0b08244d7d.html

[-- Attachment #2: Type: text/html, Size: 2296 bytes --]

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
  2011-11-18  0:22 when export org-mode to html, don't export entries of TODO, CANCELED filebat Mark
@ 2011-11-18  1:46 ` Bernt Hansen
  2011-11-18  2:10   ` filebat Mark
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2011-11-18  1:46 UTC (permalink / raw)
  To: filebat Mark; +Cc: Denny Zhang, emacs-orgmode

filebat Mark <filebat.mark@gmail.com> writes:

> Exporting org-mode's entries to html is a fantastic way for knowledge
> sharing!
>
> Usually entries of "TODO" "HALF" "DELEGATE" "CANCELED" "DEFERRED" are
> incomplete/immature knowledge.  Thus, I don't want to export
> them. Furthermore, after they are marked as "DONE", I'd like to export
> them.
>
> Any idea for how to do this?  Note that org-export-exclude-tags
> doesn't help us, at my first glance.
>
>
> Draft solution:
> After checking the implementation of org-mode for this part, I found
> org-export-handle-export-tags function.  It determines what to be
> excluded when exporting, by search regexp of :\\(TAG1\\|TAG2\\|...\\):
> in entries' title.
>
> Thus I override org-export-handle-export-tags, by search regexp of \\(TAG1\\|TAG2\\|...\\) with leading/tailing colon removed.
>
> It's ugly but it works.
> So my open question is what's the better solution?

Hi,

Try adding this to your org file and then exporting

#+OPTIONS: tasks:("DONE") todo:nil

Regards,
Bernt

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
  2011-11-18  1:46 ` Bernt Hansen
@ 2011-11-18  2:10   ` filebat Mark
  2011-11-18  2:59     ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: filebat Mark @ 2011-11-18  2:10 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Denny Zhang, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

Hi Bernt

I am not sure whether I get you correctly.

The behavior of [#+OPTIONS: tasks:("DONE") todo:nil] looks like (setq
org-export-with-todo-keywords nil).

My purpose is not to export entries of "TODO", "CANCELED", etc, instead of
only strings of "TODO", "CANCELED".



On Fri, Nov 18, 2011 at 9:46 AM, Bernt Hansen <bernt@norang.ca> wrote:

> filebat Mark <filebat.mark@gmail.com> writes:
>
> > Exporting org-mode's entries to html is a fantastic way for knowledge
> > sharing!
> >
> > Usually entries of "TODO" "HALF" "DELEGATE" "CANCELED" "DEFERRED" are
> > incomplete/immature knowledge.  Thus, I don't want to export
> > them. Furthermore, after they are marked as "DONE", I'd like to export
> > them.
> >
> > Any idea for how to do this?  Note that org-export-exclude-tags
> > doesn't help us, at my first glance.
> >
> >
> > Draft solution:
> > After checking the implementation of org-mode for this part, I found
> > org-export-handle-export-tags function.  It determines what to be
> > excluded when exporting, by search regexp of :\\(TAG1\\|TAG2\\|...\\):
> > in entries' title.
> >
> > Thus I override org-export-handle-export-tags, by search regexp of
> \\(TAG1\\|TAG2\\|...\\) with leading/tailing colon removed.
> >
> > It's ugly but it works.
> > So my open question is what's the better solution?
>
> Hi,
>
> Try adding this to your org file and then exporting
>
> #+OPTIONS: tasks:("DONE") todo:nil
>
> Regards,
> Bernt
>



-- 
Thanks & Regards

Denny Zhang

[-- Attachment #2: Type: text/html, Size: 2215 bytes --]

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
  2011-11-18  2:10   ` filebat Mark
@ 2011-11-18  2:59     ` Bernt Hansen
  2011-11-18  3:18       ` markfilebat126
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2011-11-18  2:59 UTC (permalink / raw)
  To: filebat Mark; +Cc: Denny Zhang, emacs-orgmode

filebat Mark <filebat.mark@gmail.com> writes:

> Hi Bernt
>
> I am not sure whether I get you correctly.
>
> The behavior of [#+OPTIONS: tasks:("DONE") todo:nil] looks like (setq
> org-export-with-todo-keywords nil).
>
> My purpose is not to export entries of "TODO", "CANCELED", etc,
> instead of only strings of "TODO", "CANCELED".

This should export all headings that have no todo keyword AND headings
with the DONE keyword.  All other keywords are skipped which I thought
was what you were trying to accomplish.

I tested it with this org file: http://norang.ca/tmp/scratch.org
which exports to http://norang.ca/tmp/scratch.html

-Bernt

>
> On Fri, Nov 18, 2011 at 9:46 AM, Bernt Hansen <bernt@norang.ca>
> wrote:
>
>     filebat Mark <filebat.mark@gmail.com> writes:
>    
>     > Exporting org-mode's entries to html is a fantastic way for
>     knowledge
>     > sharing!
>     >
>     > Usually entries of "TODO" "HALF" "DELEGATE" "CANCELED"
>     "DEFERRED" are
>     > incomplete/immature knowledge.  Thus, I don't want to export
>     > them. Furthermore, after they are marked as "DONE", I'd like to
>     export
>     > them.
>     >
>     > Any idea for how to do this?  Note that org-export-exclude-tags
>     > doesn't help us, at my first glance.
>     >
>     >
>     > Draft solution:
>     > After checking the implementation of org-mode for this part, I
>     found
>     > org-export-handle-export-tags function.  It determines what to
>     be
>     > excluded when exporting, by search regexp of :\\(TAG1\\|TAG2\\
>     |...\\):
>     > in entries' title.
>     >
>     > Thus I override org-export-handle-export-tags, by search regexp
>     of \\(TAG1\\|TAG2\\|...\\) with leading/tailing colon removed.
>     >
>     > It's ugly but it works.
>     > So my open question is what's the better solution?
>    
>     Hi,
>    
>     Try adding this to your org file and then exporting
>    
>     #+OPTIONS: tasks:("DONE") todo:nil
>    
>     Regards,
>     Bernt
>
>
>
>
> --
> Thanks & Regards
>
> Denny Zhang

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
  2011-11-18  2:59     ` Bernt Hansen
@ 2011-11-18  3:18       ` markfilebat126
  2011-11-18  3:46         ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: markfilebat126 @ 2011-11-18  3:18 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: filebat Mark, emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

Yes, Bernt, this is exactly what I want.
I will dig into why my org-mode behavior is different from yours, when I
return home.

,----------- my environment
| GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-09-02 on pluot, modified by Debian
| Org-mode version 7.5
`-----------

Thanks a lot, Bernt!

Denny
> filebat Mark <filebat.mark@gmail.com> writes:
>
>> Hi Bernt
>>
>> I am not sure whether I get you correctly.
>>
>> The behavior of [#+OPTIONS: tasks:("DONE") todo:nil] looks like (setq
>> org-export-with-todo-keywords nil).
>>
>> My purpose is not to export entries of "TODO", "CANCELED", etc,
>> instead of only strings of "TODO", "CANCELED".
>
> This should export all headings that have no todo keyword AND headings
> with the DONE keyword.  All other keywords are skipped which I thought
> was what you were trying to accomplish.
>
> I tested it with this org file: http://norang.ca/tmp/scratch.org
> which exports to http://norang.ca/tmp/scratch.html
>
> -Bernt
>
>>
>> On Fri, Nov 18, 2011 at 9:46 AM, Bernt Hansen <bernt@norang.ca>
>> wrote:
>>
>>     filebat Mark <filebat.mark@gmail.com> writes:
>>    
>>     > Exporting org-mode's entries to html is a fantastic way for
>>     knowledge
>>     > sharing!
>>     >
>>     > Usually entries of "TODO" "HALF" "DELEGATE" "CANCELED"
>>     "DEFERRED" are
>>     > incomplete/immature knowledge.  Thus, I don't want to export
>>     > them. Furthermore, after they are marked as "DONE", I'd like to
>>     export
>>     > them.
>>     >
>>     > Any idea for how to do this?  Note that org-export-exclude-tags
>>     > doesn't help us, at my first glance.
>>     >
>>     >
>>     > Draft solution:
>>     > After checking the implementation of org-mode for this part, I
>>     found
>>     > org-export-handle-export-tags function.  It determines what to
>>     be
>>     > excluded when exporting, by search regexp of :\\(TAG1\\|TAG2\\
>>     |...\\):
>>     > in entries' title.
>>     >
>>     > Thus I override org-export-handle-export-tags, by search regexp
>>     of \\(TAG1\\|TAG2\\|...\\) with leading/tailing colon removed.
>>     >
>>     > It's ugly but it works.
>>     > So my open question is what's the better solution?
>>    
>>     Hi,
>>    
>>     Try adding this to your org file and then exporting
>>    
>>     #+OPTIONS: tasks:("DONE") todo:nil
>>    
>>     Regards,
>>     Bernt
>>
>>
>>
>>
>> --
>> Thanks & Regards
>>
>> Denny Zhang
>

-- 
Denny Zhang
电话: 18621908421
邮箱: markfilebat@126.com
微博: http://weibo.com/1686664253
博客: http://hi.baidu.com/filebat

你想要管理的事情越平淡无奇,你的系统就需要越复杂才能把它们管理好。


●█〓██▄▄▄▄▄▄ ●●●●●●----
▄▅██████▅▄▃▂
██████████████
◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲◤

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
  2011-11-18  3:18       ` markfilebat126
@ 2011-11-18  3:46         ` Nick Dokos
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2011-11-18  3:46 UTC (permalink / raw)
  To: markfilebat126; +Cc: Bernt Hansen, nicholas.dokos, emacs-orgmode, filebat Mark

markfilebat126 <markfilebat@126.com> wrote:

> Bernt Hansen <bernt@norang.ca> writes:
> 
> Yes, Bernt, this is exactly what I want.
> I will dig into why my org-mode behavior is different from yours, when I
> return home.
> 
> ,----------- my environment
> | GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-09-02 on pluot, modified by Debian
> | Org-mode version 7.5
> `-----------
> 

release 7.5 was done on March 7, 2011. The tasks option was added to org-mode
on March 30, 2011. So you will need to upgrade to take advantage of it.

Nick

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

* Re: when export org-mode to html, don't export entries of TODO, CANCELED
@ 2011-11-18  5:05 Denny
  0 siblings, 0 replies; 7+ messages in thread
From: Denny @ 2011-11-18  5:05 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bernt Hansen, emacs-orgmode, filebat Mark

got it, thanks all

Nick Dokos <nicholas.dokos@hp.com>编写:

>markfilebat126 <markfilebat@126.com> wrote:
>
>> Bernt Hansen <bernt@norang.ca> writes:
>> 
>> Yes, Bernt, this is exactly what I want.
>> I will dig into why my org-mode behavior is different from yours, when I
>> return home.
>> 
>> ,----------- my environment
>> | GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-09-02 on pluot, modified by Debian
>> | Org-mode version 7.5
>> `-----------
>> 
>
>release 7.5 was done on March 7, 2011. The tasks option was added to org-mode
>on March 30, 2011. So you will need to upgrade to take advantage of it.
>
>Nick

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

end of thread, other threads:[~2011-11-18  5:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-18  0:22 when export org-mode to html, don't export entries of TODO, CANCELED filebat Mark
2011-11-18  1:46 ` Bernt Hansen
2011-11-18  2:10   ` filebat Mark
2011-11-18  2:59     ` Bernt Hansen
2011-11-18  3:18       ` markfilebat126
2011-11-18  3:46         ` Nick Dokos
  -- strict thread matches above, loose matches on Subject: below --
2011-11-18  5:05 Denny

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).