diff options
author | David Maus <dmaus@ictsoc.de> | 2011-08-30 06:22:12 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-10-22 16:17:43 +0200 |
commit | 336cc53518ff3fe7ac89f9d2a7708a93c8d65169 (patch) | |
tree | c38fc2f417acc5c9c543745b0aa5fbbdd97e56d3 | |
parent | 8302ba8df0637285491d76fdf800c77d05377bb7 (diff) | |
download | org-mode-336cc53518ff3fe7ac89f9d2a7708a93c8d65169.tar.gz |
Extend scope 'region to include entire body of last headline in active region
* org.el (org-map-entries): Extend scope 'region to include
entire body of last headline in active region.
-rw-r--r-- | lisp/org.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index d82ae0c..96abf6e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13683,7 +13683,12 @@ a *different* entry, you cannot use these techniques." (org-narrow-to-subtree) (setq scope nil)) ((and (eq scope 'region) (org-region-active-p)) - (narrow-to-region (region-beginning) (region-end)) + (narrow-to-region (region-beginning) + (save-excursion + (goto-char (region-end)) + (unless (and (bolp) (org-at-heading-p)) + (outline-next-heading)) + (point))) (setq scope nil))) (if (not scope) |