diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-24 05:35:00 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-24 05:35:00 +0100 |
commit | 8f819da4d5f486921f96245d4f304ad37c2a2546 (patch) | |
tree | e714cf69e9dc9318ca358bc3d1d1732aef664665 | |
parent | 21221dd564c09220f6b919fe25d23fe8302cf4ea (diff) | |
download | org-mode-8f819da4d5f486921f96245d4f304ad37c2a2546.tar.gz |
org-choose.el: Fix bug with checking siblings
Org-choose.el would check not only siblings but also any children of
them.
Patch by Tom Breton
-rw-r--r-- | contrib/ChangeLog | 5 | ||||
-rw-r--r-- | contrib/lisp/org-choose.el | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index b5ddbeb..6edf775 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2009-02-24 Carsten Dominik <carsten.dominik@gmail.com> + + * lisp/org-choose.el (org-choose-get-fn-map-group): Only check + true siblings. + 2009-02-18 Carsten Dominik <carsten.dominik@gmail.com> * lisp/org-R.el: New file. diff --git a/contrib/lisp/org-choose.el b/contrib/lisp/org-choose.el index 9e07f79..1c72ebb 100644 --- a/contrib/lisp/org-choose.el +++ b/contrib/lisp/org-choose.el @@ -389,8 +389,13 @@ setting was changed." (save-excursion (unless (org-up-heading-safe) (error "Chosing is only supported between siblings in a tree, not on top level")) - (save-restriction - (org-map-entries fn nil 'tree))))) + (let + ((level (org-reduced-level (org-outline-level)))) + (save-restriction + (org-map-entries + fn + (format "LEVEL=%d" level) + 'tree)))))) ;;;_ . org-choose-get-highest-mark-index |