emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] How can I just publish entry marked as DONE?


From: David Maus
Subject: Re: [Orgmode] How can I just publish entry marked as DONE?
Date: Tue, 26 Oct 2010 21:34:45 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 08 Oct 2010 16:35:06 +0800,
Water Lin wrote:
>
>
> I am using org project to build my web page. I have written a lot of
> stuff but while I am publishing the org files, I just want to publish
> the part which are marked as DONE( the keyword ).
>
> Is it possbile?

Yes, for example with this function that is added to
org-export-process-hook:

(defun dmj:org-remove-subtrees-in-export ()
  "Remove subtrees during export."
  (org-map-entries (lambda ()
                     (let ((beg (point))
                           (end (org-end-of-subtree t)))
                       (kill-region beg end))) "/-DONE"))

(add-hook 'org-export-preprocess-hook 'dmj:org-remove-subtrees-in-export)

This function will remove all items that are not marked done
("/-DONE", see Manual about TAGS/PROP/TODO queries) before the
exported file is created.

Of course adding this function to the hook enables it for /all/
exports, what may not be what you've wanted.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpOgjtIGAiDW.pgp
Description: PGP signature


reply via email to

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