From 336cc53518ff3fe7ac89f9d2a7708a93c8d65169 Mon Sep 17 00:00:00 2001 From: David Maus Date: Tue, 30 Aug 2011 06:22:12 +0200 Subject: [PATCH] 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. --- lisp/org.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d82ae0ce3..96abf6e29 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) -- 2.11.4.GIT