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'.
This commit is contained in:
Andrew Hyatt 2024-01-28 21:33:20 -04:00 committed by Ihor Radchenko
parent 813614cff4
commit f490c1548a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
3 changed files with 20 additions and 2 deletions

View File

@ -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)}}} ::

View File

@ -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

View File

@ -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))