diff --git a/lisp/org.el b/lisp/org.el index 189b41676..7939804ae 100644 --- a/lisp/org.el +++ b/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))) (org-set-tags arg just-align) (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)))) (defun org-set-tags-to (data)