From edba5580946e0f55ddd4e7388fb0dce5ddb166d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Thu, 7 Oct 2021 16:33:39 +0300 Subject: [PATCH 10/76] Deprecate org-agenda-loop-over-headlines-in-active-region. --- lisp/org-agenda.el | 14 +++++++------- lisp/org-compat.el | 2 ++ lisp/org.el | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 119fd0b7b..e2d9efbe4 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8948,7 +8948,7 @@ When called with a prefix argument, include all archive files as well." Point is in the buffer where the item originated.") ;; Defined later in org-agenda.el -(defvar org-agenda-loop-over-headlines-in-active-region nil) +(defvar org-agenda-loop-over-headings-in-active-region nil) (defun org-agenda-do-in-region (beg end cmd &optional arg force-arg delete) "Between region BEG and END, call agenda command CMD. @@ -8958,10 +8958,10 @@ deletes the agenda entry and don't move to the next entry." (save-excursion (goto-char beg) (let ((mend (move-marker (make-marker) end)) - (all (eq org-agenda-loop-over-headlines-in-active-region t)) - (match (and (stringp org-agenda-loop-over-headlines-in-active-region) - org-agenda-loop-over-headlines-in-active-region)) - (level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level) + (all (eq org-agenda-loop-over-headings-in-active-region t)) + (match (and (stringp org-agenda-loop-over-headings-in-active-region) + org-agenda-loop-over-headings-in-active-region)) + (level (and (eq org-agenda-loop-over-headings-in-active-region 'start-level) (org-get-at-bol 'level)))) (while (< (point) mend) (let ((ov (make-overlay (point) (point-at-eol)))) @@ -8983,7 +8983,7 @@ deletes the agenda entry and don't move to the next entry." Pass ARG, FORCE-ARG, DELETE and BODY to `org-agenda-do-in-region'." (declare (debug t)) `(if (and (called-interactively-p 'any) - org-agenda-loop-over-headlines-in-active-region + org-agenda-loop-over-headings-in-active-region (org-region-active-p)) (org-agenda-do-in-region (region-beginning) (region-end) ,cmd ,arg ,force-arg ,delete) @@ -10443,7 +10443,7 @@ bulk action." :version "24.1" :type 'boolean) -(defcustom org-agenda-loop-over-headlines-in-active-region t +(defcustom org-agenda-loop-over-headings-in-active-region t "Shall some commands act upon headings in the active region? When set to t, some commands will be performed in all headings diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 77d9a06a7..ac8073cad 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -328,6 +328,8 @@ Counting starts at 1." 'org-agenda-filtered-by-top-heading "9.5") (define-obsolete-variable-alias 'org-agenda-headline-snapshot-before-repeat 'org-agenda-heading-snapshot-before-repeat "9.5") +(define-obsolete-variable-alias 'org-agenda-loop-over-headlines-in-active-region + 'org-agenda-loop-over-headings-in-active-region "9.5") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." diff --git a/lisp/org.el b/lisp/org.el index b41986246..a79000b83 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -929,7 +929,7 @@ The list of commands is: `org-schedule', `org-deadline', `org-archive-to-archive-sibling'. The archiving commands skip already archived entries. -See `org-agenda-loop-over-headlines-in-active-region' for the +See `org-agenda-loop-over-headings-in-active-region' for the equivalent option for agenda views." :type '(choice (const :tag "Don't loop" nil) (const :tag "All headings in active region" t) -- 2.33.0