emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: ePub and Org mode
Date: Sun, 20 Feb 2011 01:17:24 -0700	[thread overview]
Message-ID: <877hcv83fe.fsf@gmail.com> (raw)
In-Reply-To: 87aahrxhu4.fsf@Rainer.invalid

Achim Gratz <Stromeko@nexgo.de> writes:

> Christian Moe <mail@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.
`----

  reply	other threads:[~2011-02-20  9:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-19  9:25 ePub and Org mode Alan L Tyree
2011-02-19 10:54 ` Bastien
2011-02-19 19:14   ` Alan L Tyree
2011-02-19 21:46 ` Christian Moe
2011-02-19 22:15   ` Alan L Tyree
2011-02-20  7:53   ` Achim Gratz
2011-02-20  8:17     ` Eric Schulte [this message]
2011-02-21  1:34       ` Richard Lawrence
2011-02-20  9:54     ` Alan Tyree

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hcv83fe.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).