Kaynağa Gözat

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.
David Maus 13 yıl önce
ebeveyn
işleme
336cc53518
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      lisp/org.el

+ 6 - 1
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)