[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] New feature: loop over siblings for some commands
From: |
Bastien |
Subject: |
Re: [O] New feature: loop over siblings for some commands |
Date: |
Wed, 27 Jul 2011 17:28:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi David,
David Maus <address@hidden> writes:
> I highly recommend to not use this macro but to build the intended
> functionality with separate building blocks: Factor out the flesh of
> the respective functions (e.g. org-schedule) and use org-map-entries
> to map. As far as I can see, the latter provides all we need:
I took this road.
The first patch manually reverts the commit you are commenting.
The second patch lets `org-map-entries' take a region as a scope.
The third patch implements the "loop" functionality by just using
`org-map-entries', not a macro.
I'm sure we could have an `org-loop' macro factoring out the duplicate
code in the new `org-schedule' and `org-deadline'. If you have time to
look at this, that will greatly help.
> Another abstraction: Instead
> 'org-loop-over-siblings-with-active-region' something like:
> 'org-loop-over-headlines-with-active-region' that can be set to a
> symbol or a list of symbols indicating which headings to loop over
> (e.g. 'siblings, 'children, ...).
The variable is now called `org-loop-over-headlines-in-active-region'
and understand these kind of values:
- nil: don't loop
- t: loop over all headlines
- "MATCH": a tag/property/todo match to loop over matching headlines
If you can test these patches and send some feedback, that'd be nice!
Thanks again for the analysis and the suggested solution.
0001-Manually-revert-366254217ac6faea20a5d43fae065bd02880.patch
Description: Text Data
0002-org.el-org-map-entries-Allow-SCOPE-to-be-the-active-.patch
Description: Text Data
0003-New-implementation-for-org-loop-over-headlines-in-ac.patch
Description: Text Data
--
Bastien