mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-27 15:02:54 +00:00
org-set-tags-command: Fix handling `org-loop-over-headlines-in-active-region'
* lisp/org.el (org-set-tags-command): Respect the non-nil value of `org-loop-over-headlines-in-active-region'. The code is adapted from similar uses in other commands. Reported-by: Alex Giorev <alex.giorev@gmail.com> Link: https://orgmode.org/list/CAMq3WZh1sGW+BNKW1hZA+wP=iFskzShF-D-wUqWYqb_EponZ8g@mail.gmail.com
This commit is contained in:
parent
c70a422082
commit
7880695221
|
@ -11573,13 +11573,12 @@ in Lisp code use `org-set-tags' instead."
|
|||
(cond
|
||||
((equal '(4) arg) (org-align-tags t))
|
||||
((and (org-region-active-p) org-loop-over-headlines-in-active-region)
|
||||
(let (org-loop-over-headlines-in-active-region) ; hint: infinite recursion.
|
||||
(let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
|
||||
'region-start-level 'region))
|
||||
org-loop-over-headlines-in-active-region) ; hint: infinite recursion.
|
||||
(org-map-entries
|
||||
#'org-set-tags-command
|
||||
nil
|
||||
(if (eq org-loop-over-headlines-in-active-region 'start-level)
|
||||
'region-start-level
|
||||
'region)
|
||||
nil cl
|
||||
(lambda () (when (org-invisible-p) (org-end-of-subtree nil t))))))
|
||||
(t
|
||||
(save-excursion
|
||||
|
|
Loading…
Reference in a new issue