New feature: allow some commands to loop over siblings.
commit366254217ac6faea20a5d43fae065bd028806eab
authorBastien Guerry <bzg@altern.org>
Mon, 18 Jul 2011 08:09:53 +0000 (18 10:09 +0200)
committerBastien Guerry <bzg@altern.org>
Mon, 18 Jul 2011 08:09:53 +0000 (18 10:09 +0200)
tree3448825f6758dcb06282e753a24d69cb96a217e9
parent52fd74798394ecc136464192b231ff62d538ed57
New feature: allow some commands to loop over siblings.

This commit introduce `org-loop-over-siblings-within-active-region-p'
as a new defcustom that you can turn on (`non-nil') to allow commands
to loop over siblings in the active region.

The list of commands is this:

- org-archive-subtree
- org-archive-to-archive-sibling
- org-toggle-archive-tag
- org-deadline
- org-schedule

When `org-loop-over-siblings-within-active-region-p' is `non-nil' and
you run one of the command above on a region containing several headlines,
then Org will apply the command to each headline.

This can be particularily useful for archiving several headlines, or to
add a deadline or schedule several entries.

* org.el (org-loop-over-siblings-within-active-region-p): New
defcustom so that `org-loop-over-siblings-in-active-region'
can be turned on and off.
(org-deadline, org-schedule): Use the new macro.

* org-macs.el (org-loop-over-siblings-in-active-region): New
macro to let some commands act upon several siblings in the
active region.

* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Use
`org-loop-over-siblings-in-active-region'.
lisp/org-archive.el
lisp/org-macs.el
lisp/org.el