At Mon, 18 Jul 2011 10:32:11 +0200, Bastien wrote: > > Dear all, > > from latest git repo: > > (setq org-loop-over-siblings-within-active-region-p t) > > will allow you to run some commands on several siblings in > the active region. > > For example: > > > * Item 1 > * Item 2 > * Item 3 > > > Then `C-c C-s' (org-schedule) will ask for a schedule date > for each of the item in the active region. See the commit > log for more details: > > http://orgmode.org/w/?p=org-mode.git;a=commit;h=366254217ac6faea20a5d43fae065bd028806eab > > I'm interested in allowing this for org-todo as well, but I > would first like some feedback on the current feature and its > scope wrt actual needs. The macro suffers from leaking: It let-binds symbols like beg, end etc. that might be present in ,@body. The let-bound symbols will shadow body's. Minimal example: ,---- | (defmacro leak-it-baby (&rest body) | `(let ((foobar 0)) | (while (< foobar 10) | (setq foobar (1+ foobar)) | ,@body))) | | (let ((foobar 9)) | (leak-it-baby | (setq foobar 11) | (print foobar))) | | ELISP> (macroexpand '(leak-it-baby (setq foobar 11))) | (let | ((foobar 0)) | (while | (< foobar 10) | (setq foobar | (1+ foobar)) | (setq foobar 11))) | | ELISP> `---- The whole problem of leaking macros is discussed in Peter Seibel's "Practical Common Lisp", Chapter 8 http://www.gigamonkeys.com/book/macros-defining-your-own.html The solution is a heavy use of C-h f gensym RET for all symboles needed in the macro to create fresh, unique und uninterned symbols. If no one jumps on a fix for this I will provide one till next sunday. Always wanted to do some lecker macro programming :) Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de