Achim Gratz <strom...@nexgo.de> writes: > Christian Moe <m...@christianmoe.com> 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. `---- _______________________________________________ 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