diff --git a/lisp/org.el b/lisp/org.el index 2528fa82f..24b0aa1fc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -418,9 +418,10 @@ When set to a string, those commands will be performed on the matching headlines within the active region. Such string must be a tags/property/todo match as it is used in the agenda tags view. -The list of commands is: -- `org-schedule' -- `org-deadline'" +The list of commands is: `org-schedule', `org-deadline', +`org-todo', `org-archive-subtree', `org-archive-set-tag' and +`org-archive-to-archive-sibling'. The archiving commands skip +already archived entries." :type '(choice (const :tag "Don't loop" nil) (const :tag "All headlines in active region" t) (const :tag "In active region, headlines at the same level than the first one" 'start-level) @@ -11192,12 +11193,13 @@ For calling through lisp, arg is also interpreted in the following way: really is a member of `org-todo-keywords'." (interactive "P") (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) - (let (org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) (org-map-entries `(org-todo ,arg) org-loop-over-headlines-in-active-region - 'region - (if (outline-invisible-p) (org-end-of-subtree nil t)))) + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) (if (equal arg '(16)) (setq arg 'nextset)) (let ((org-blocker-hook org-blocker-hook) (case-fold-search nil)) @@ -11950,9 +11952,13 @@ With argument TIME, set the deadline at the corresponding date. TIME can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"." (interactive "P") (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) - (let (org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) (org-map-entries - `(org-deadline ',remove ,time) org-loop-over-headlines-in-active-region 'region (if (outline-invisible-p) (org-end-of-subtree nil t)))) + `(org-deadline ',remove ,time) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) (let* ((old-date (org-entry-get nil "DEADLINE")) (repeater (and old-date (string-match @@ -11994,9 +12000,13 @@ With argument TIME, scheduled at the corresponding date. TIME can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"." (interactive "P") (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) - (let (org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) (org-map-entries - `(org-schedule ',remove ,time) org-loop-over-headlines-in-active-region 'region (if (outline-invisible-p) (org-end-of-subtree nil t)))) + `(org-schedule ',remove ,time) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) (let* ((old-date (org-entry-get nil "SCHEDULED")) (repeater (and old-date (string-match