emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 7880695221: org-set-tags-command: Fix handling `org


From: ELPA Syncer
Subject: [elpa] externals/org 7880695221: org-set-tags-command: Fix handling `org-loop-over-headlines-in-active-region'
Date: Sat, 29 Oct 2022 01:57:51 -0400 (EDT)

branch: externals/org
commit 78806952218e87f4a413a29c908161f97572f97d
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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
---
 lisp/org.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a1a84c5b03..9e5b5e8aad 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]