* lisp/org-agenda.el (org-agenda-get-progress): Set "type"
text-property according to why the item was matched.
Previously, the "type" text-property was always set to "closed", even
when an item was actually matched because of its "Clock" or "State"
line.
Note: it's possible that some code might expect the value to be
"closed" in all 3 cases, in which case this could cause a minor
regression, so this change should be carefully considered. However,
in the long run, it seems like the correct thing to do and a
worthwhile change to make.
* lisp/org-agenda.el (org-agenda-get-progress): Accept multiple spaces
between the list bullet and "State" in the state-change regexp.
Previously, logbook list entries with more than one space between the
bullet and the beginning of the entry would be ignored. I.e., if
a bullet is defined in org-list-two-spaces-after-bullet-regexp, two
spaces will be inserted after the bullet, and that prevents
state-changed entries from appearing in the Agenda Log Mode view.
* lisp/org-agenda.el (org-agenda-mode): Factored out a function for a
loop occuring two times.
* testing/lisp/test-org-agenda.el: test the text scale after
agenda-undo.
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Properly display
drawers when SPC is pressed. Hide them again with a universal
prefix argument.
Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00254.html>
* lisp/org-agenda.el (org-agenda-mode): Save and restore local
variables text-scale-mode-amount, text-scale-mode,
text-scale-mode-lighter, face-remapping-alist. In effect
this keeps the text-scale at agenda rebuild and redo.
This commit is predicated on the newsgroup post of Samuel Wales "point
moves and zoom level reverts when refreshing agenda" at Sun, 27 May
2018.
* lisp/org-agenda.el:
(org-agenda-todo-nextset, org-agenda-set-tags): Use “(foo ...)”
instead of “(funcall 'foo ...)”.
(org-agenda-add-entry-to-org-agenda-diary-file): Convert a cond to a
cl-case.
Also remove some compatibility code to work around an emacs feature
that was changed in 2005 (emacs commit 9a20c79b)
* lisp/org-agenda.el (org-agenda-filter-by-regexp): Remove
existing regexp filter. Only cumulate filters when called
with two prefix arguments.
It seems more common and reasonable to hit "=" to filter
then hit "=" again to remove the filter. Cumulative filters
are still accessible through hitting `C-u C-u ='.
* lisp/org-compat.el (org-speedbar-set-agenda-restriction):
* lisp/org-agenda.el (org-agenda-set-restriction-lock):
If there is an agenda restriction at point, remove it.
* doc/org-manual.org:
* etc/ORG-NEWS: Document the new feature.
* lisp/org-agenda.el (org-tags-view): Don't leave an empty
*Org agenda* buffer when keyboard-quitting the match prompt.
Thanks to Xu Chunyang for reporting this.
* lisp/org-agenda.el (org-agenda-format-item): Fix missing colons in
agenda tags.
This regression was introduced in "Standardize tag regexps" commit.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00321.html>
* lisp/org.el (org-tag-re):
(org-tag-group-re): New variable
(org-tag-string-to-alist):
(org-scan-tags):
(org-make-tags-matcher):
(org-fast-tag-selection): Use new variables.
* lisp/org-agenda.el (org-agenda-list-stuck-projects):
(org-agenda-format-item):
(org-agenda-fix-displayed-tags):
* lisp/org-archive.el (org-archive-subtree): Use new variables.
* lisp/org-agenda.el (org-agenda-list): Condition the call to
`recenter` only when the buffer has a window associated.
This permit to call `org-agenda-list` in a `with-temp-buffer` like
below:
(with-temp-buffer
(let ((org-agenda-sticky nil)
(org-agenda-buffer-tmp-name (buffer-name)))
(org-agenda-list 1)
(buffer-string))
* 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