From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: ePub and Org mode Date: Sun, 20 Feb 2011 01:17:24 -0700 Message-ID: <877hcv83fe.fsf@gmail.com> References: <20110219202502.decc3e3e.alantyree@gmail.com> <4D603A1A.9020601@christianmoe.com> <87aahrxhu4.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=56623 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pr5WJ-0007ho-E0 for emacs-orgmode@gnu.org; Sun, 20 Feb 2011 04:24:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pr5WG-0004Bg-Vb for emacs-orgmode@gnu.org; Sun, 20 Feb 2011 04:23:58 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:48612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pr5WG-0004BV-QN for emacs-orgmode@gnu.org; Sun, 20 Feb 2011 04:23:56 -0500 Received: by iyf13 with SMTP id 13so1720525iyf.0 for ; Sun, 20 Feb 2011 01:23:55 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz writes: > Christian Moe writes: >> I agree exporting 'chapters' in a single Org document to separate html >> files would be a nice option to have. >> >> Pending someone writing an export function for this, you could > [...] > > That sort of already exists, I've been using that to some good > effect... from the documentation: > > When exporting only a single subtree by selecting it with `C-c @' > before calling an export command, the subtree can overrule some of the > file's export settings with properties `EXPORT_FILE_NAME', > `EXPORT_TITLE', `EXPORT_TEXT', `EXPORT_AUTHOR', `EXPORT_DATE', and > `EXPORT_OPTIONS'. > > The only thing missing is a function to export all (not excluded) > subtrees one by one and honor the properties slapped onto each subtree. > `org-map-entries' should satisfy this need. -- Eric ,---- | org-map-entries is a Lisp function in `org.el'. | | (org-map-entries FUNC &optional MATCH SCOPE &rest SKIP) | | Call FUNC at each headline selected by MATCH in SCOPE. | | FUNC is a function or a lisp form. The function will be called without | arguments, with the cursor positioned at the beginning of the headline. | The return values of all calls to the function will be collected and | returned as a list. | | The call to FUNC will be wrapped into a save-excursion form, so FUNC | does not need to preserve point. After evaluation, the cursor will be | moved to the end of the line (presumably of the headline of the | processed entry) and search continues from there. Under some | circumstances, this may not produce the wanted results. For example, | if you have removed (e.g. archived) the current (sub)tree it could | mean that the next entry will be skipped entirely. In such cases, you | can specify the position from where search should continue by making | FUNC set the variable `org-map-continue-from' to the desired buffer | position. | | MATCH is a tags/property/todo match as it is used in the agenda tags view. | Only headlines that are matched by this query will be considered during | the iteration. When MATCH is nil or t, all headlines will be | visited by the iteration. | | SCOPE determines the scope of this command. It can be any of: | | nil The current buffer, respecting the restriction if any | tree The subtree started with the entry at point | file The current buffer, without restriction | file-with-archives | The current buffer, and any archives associated with it | agenda All agenda files | agenda-with-archives | All agenda files with any archive files associated with them | (file1 file2 ...) | If this is a list, all files in the list will be scanned | | The remaining args are treated as settings for the skipping facilities of | the scanner. The following items can be given here: | | archive skip trees with the archive tag. | comment skip trees with the COMMENT keyword | function or Emacs Lisp form: | will be used as value for `org-agenda-skip-function', so whenever | the function returns t, FUNC will not be called for that | entry and search will continue from the point where the | function leaves it. | | If your function needs to retrieve the tags including inherited tags | at the *current* entry, you can use the value of the variable | `org-scanner-tags' which will be much faster than getting the value | with `org-get-tags-at'. If your function gets properties with | `org-entry-properties' at the *current* entry, bind `org-trust-scanner-tags' | to t around the call to `org-entry-properties' to get the same speedup. | Note that if your function moves around to retrieve tags and properties at | a *different* entry, you cannot use these techniques. `----