branch: externals/org commit f490c1548a6a76e74a6790bd6373811ac28c8e15 Author: Andrew Hyatt <ahy...@gmail.com> Commit: Ihor Radchenko <yanta...@posteo.net>
org-agenda: New customization `org-agenda-start-with-archives-mode' * lisp/org-agenda.el: Add `org-agenda-start-with-archives-mode'. (org-agenda-mode): Set value of `org-agenda-archive-mode' according to value of new variable `org-agenda-start-with-archives-mode'. * doc/org-manual.org: Note new variable in the documentation of `org-agenda-archives-mode'. * etc/ORG-NEWS: Note change to add `org-agenda-start-with-archives-mode'. --- doc/org-manual.org | 6 +++++- etc/ORG-NEWS | 5 +++++ lisp/org-agenda.el | 11 ++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index ffb025c932..9556c05337 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -10077,9 +10077,13 @@ the other commands, point needs to be in the desired line. #+kindex: v a #+findex: org-agenda-archives-mode + #+vindex: org-agenda-start-with-archives-mode Toggle Archives mode. In Archives mode, trees that are archived (see [[*Internal archiving]]) are also scanned when producing the - agenda. To exit archives mode, press {{{kbd(v a)}}} again. + agenda. To exit archives mode, press {{{kbd(v a)}}} again. The + initial setting for this mode in new agenda buffers can set with the + variable ~org-agenda-start-with-archives-mode~, which can be set + with the same values as ~org-agenda-archives-mode~. - {{{kbd(v A)}}} :: diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index eb4303cf1f..a8171ade72 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -693,6 +693,11 @@ manner with ~run-python~. This allows to run functions after ~org-indent~ intializes a buffer to enrich its properties. +*** New option ~org-agenda-start-with-archives-mode~ + +This option starts the agenda to automatically include archives, +propagating the value for this variable to ~org-agenda-archives-mode~. +For acceptable values and their meaning, see the value of that variable. ** New features *** =ob-plantuml.el=: Support tikz file format output diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 20da364b5b..bfd715060c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1102,6 +1102,14 @@ removed from entry text before it is shown in the agenda." :group 'org-agenda :type 'string) +(defcustom org-agenda-start-with-archives-mode nil + "Initial value of archive-mode in a newly created agenda window. +See `org-agenda-archives-mode' for acceptable values and their +meaning." + :group 'org-agenda-startup + :package-version '(Org . "9.7") + :type 'symbol) + (defvar org-agenda-entry-text-cleanup-hook nil "Hook that is run after basic cleanup of entry text to be shown in agenda. This cleanup is done in a temporary buffer, so the function may inspect and @@ -2372,7 +2380,8 @@ The following commands are available: (setq org-agenda-follow-mode org-agenda-start-with-follow-mode org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode org-agenda-show-log org-agenda-start-with-log-mode - org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode)) + org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode + org-agenda-archives-mode org-agenda-start-with-archives-mode)) (add-to-invisibility-spec '(org-filtered)) (org-fold-core-initialize `(,org-link--description-folding-spec ,org-link--link-folding-spec))