From 957dcbe6ae40fa332e48455a260782ba3e61e68d Mon Sep 17 00:00:00 2001 From: David Maus Date: Tue, 30 Aug 2011 06:22:12 +0200 Subject: [PATCH 1/4] 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 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d63b854..b770fa6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13629,7 +13629,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) -- 1.7.2.5