org-agenda: make log and clockreport modes local
* lisp/org-agenda.el (org-agenda-mode): Only set `org-agenda-show-log'
and `org-agenda-clock-report-mode' to their default values when
constructing an agenda buffer, and not when redoing it.
* lisp/org-agenda.el (org-agenda-log-mode,
org-agenda-clockreport-mode): Do not set the global default value
`org-agenda-start-with-log-mode' (respectively
`org-agenda-start-with-clockreport-mode') with the current value of
`org-agenda-log-mode' (respectively `org-agenda-clockreport-mode'),
which, with sticky agendas is even buffer local.
`org-agenda-show-log' indicates if the the current agenda buffer has
log-mode enabled. When building a new agenda buffer, it gets its
value from `org-agenda-start-with-log-mode'. It is is semantically a
buffer local variable: when creating a new agenda buffer you expect it
to be set to the value in `org-agenda-start-with-log-mode'. However,
2e9c2d71 while fixing an issue with sticky agendas rendered the
variable `org-agenda-log-mode' effectively global: toggling log mode
in a given agenda buffer modifies the global default for all agenda
buffers. The same reasoning holds for clockreport mode.
This change ensures that a log or clockreport mode change made in one
agenda buffer does not propagate to other agenda buffers, existing or
new. The change is however preserved on org-agenda-redo in the
initial agenda buffer, whether using sticky agendas or not.
TINYCHANGE