Sfoglia il codice sorgente

org.el (org-set-tags-command): Fix bug.

* org.el (org-set-tags-command): Fix bug when setting tags for
multiple headlines in an active region.

Do not set the end of the region back to the beginning of the
previous headline.
Bastien Guerry 13 anni fa
parent
commit
f8b15da24c
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -13603,7 +13603,9 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
   (if (or (org-at-heading-p) (and arg (org-before-first-heading-p)))
   (if (or (org-at-heading-p) (and arg (org-before-first-heading-p)))
       (org-set-tags arg just-align)
       (org-set-tags arg just-align)
     (save-excursion
     (save-excursion
-      (org-back-to-heading t)
+      (unless (and (org-region-active-p)
+		   org-loop-over-headlines-in-active-region)
+	(org-back-to-heading t))
       (org-set-tags arg just-align))))
       (org-set-tags arg just-align))))
 
 
 (defun org-set-tags-to (data)
 (defun org-set-tags-to (data)