* lisp/org-agenda.el (org-agenda-fontify-priorities):
* lisp/org.el (org-font-lock-add-priority-faces): Fontify up to the
end of the closing bracket of the priority, as was the case before
v9.4.
7b1077def (Tiny enhancements to priority handling, 2020-01-30)
switched org-agenda-fontify-priorities and
org-font-lock-add-priority-faces over to using org-priority-regexp
rather than inline regexps. For the inline regexps, the first group
ended at the closing bracket, but the first group in
org-priority-regexp includes an optional space, leading to the face
extending one character too far.
Restore the bound to the closing bracket by determining the bound
based on the second group, the priority label, instead.
Reported-by: Roman Rudakov <rrudakov@pm.me>
Helped-by: Protesilaos Stavrou <info@protesilaos.com>
Ref: https://orgmode.org/list/87r1r2kh77.fsf@pm.me
* lisp/org-agenda.el (org-agenda-filter-by-effort):
(org-agenda-filter-completion-function): Ignore case when querying
effort property key in org-global-properties since property keys are
documented as case-insensitive.
* lisp/org-agenda.el (org-agenda-finalize): Call the hooks after the
save-excursion.
This opens the way for hooks to position the cursor after agenda
generation.
* lisp/org.el (org-cycle-hide-drawers): Move back from "org-compat.el"
(org-cycle-hook):
(org-show-entry):
(org-set-startup-visibility):
(org-clean-visibility-after-subtree-move):
(org-sort-entries): Use `org-cycle-hide-drawers'.
(org-log-beginning):
(org--hide-wrapper-toggle):
(org-hide-drawer-all): Use `outline' invisibility spec for drawers.
(org-show-all): Rewrite taking into account drawers now have the same
invisibility spec as headlines.
(org-overview):
(org-content):
(org-tree-to-indirect-buffer): Use fast arguments for `org-show-all'.
(org-mode): Remove `org-hide-drawer' invisibility spec.
* lisp/org-compat.el (org-flag-drawer): Use `outline' for drawer
invisibility.
(org-cycle-hide-drawers): move back to "org.el".
* lisp/org-clock.el (org-clock-find-position): Use `outline' for
invisibility spec.
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Use
`org-cycle-hide-drawers'.
* lisp/org-agenda.el (org-agenda-get-some-entry-text)
(org-agenda-finalize): Remove redundant code: the 'org-link face
is already set by `org-activate-links'.
Thanks to Kevin Liu for reporting this.
* lisp/org-agenda.el (org-agenda-filter)
(org-agenda-filter-set): Refactor out from 'org-agenda-filter', to
create a better interface to filter the agenda from Lisp.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Don’t try to modify string constants.
Don’t attempt to modify constant strings
00be23c2af4aa1bb09afc6404c5ef68997dc18f5
Paul Eggert
Sun May 17 16:51:46 2020 -0700
* lisp/org-agenda.el (org-agenda-skip): Consider skipping all entries
in a file if org-archive-tag is set via FILETAGS.
Reported-by: George Sokolsky <sokolgeo@posteo.net>
<87pnb4i217.fsf@posteo.net>
* lisp/org-agenda.el (org-todo-list): Use completing-read-multiple
instead of completing-read when selecting todo keywords to filter by
in Agenda. Fix a typo in the prompt.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-get-scheduled): Revert changes from
39c656870, which introduced a regression that prevents repeating tasks
from appearing for future dates.
The regression, reported in late February, seems likely to affect more
users than the one-time delay handling fixed by 39c656870
(org-agenda.el: Fix handling of one-time delays, 2020-02-01). As we
don't have a proposed fix at the moment, let's revert 39c656870.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
<87imjqdtpo.fsf@gmail.com>
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Combine filter
forms with `and' unless multiple positive categories are given.
06cf532f4 (org-agenda.el: Fix bug when using category filters,
2020-01-20) modified org-agenda-filter-make-matcher to group the form
with `or' rather than `and' for category filters. This logic was
tweaked again in a follow-up commit, 7e52b7661 (org-agenda: Fix logic
of `org-agenda-filter-make-matcher', 2020-02-19), which was supposed
to restrict the use of `or' to _multiple_ positive categories.
However, the follow-up commit incorrectly affected all filter types.
Avoid the check for non-category types.
Also, fix the regexp so that it matches whenever there are multiple
positive categories, not just a single one.
Reported-by: Jorge P. de Morais Neto <jorge+list@disroot.org>
<87v9nhit6c.fsf@disroot.org>
* lisp/org-agenda.el (org-agenda-hide-tags-regexp)
(org-agenda-category-icon-alist):
* lisp/org-protocol.el (org-protocol-data-separator):
* lisp/org-table.el (org-table-number-regexp):
* lisp/ox-latex.el (org-latex-known-warnings):
Use 'regexp' instead of 'string' as type for values that are regexps
in defcustom declarations.
Use regexp type for regexps in defcustom declarations
af085ef40b961ca3466e8b2dfb7f722573e5a4cc
Mattias Engdegård
Thu Dec 26 16:50:58 2019 +0100
* doc/org-manual.org (Execute commands in the active region):
Update the manual given the new defaults.
* etc/ORG-NEWS (New default settings for some options): New
section.
* lisp/org.el (org-loop-over-headlines-in-active-region):
Change the default value to `t'.
(org-fontify-done-headline): Ditto.
* lisp/org-agenda.el
(org-agenda-loop-over-headlines-in-active-region): Ditto.
* lisp/org-src.el (org-src-tab-acts-natively): Ditto.
* lisp/org-agenda.el (org-sort-agenda-notime-is-late): Make an
obsolete alias to `org-agenda-sort-notime-is-late'.
(org-sort-agenda-noeffort-is-high): Make an obsolete alias to
`org-agenda-sort-noeffort-is-high'.
(org-agenda-finalize-entries, org-cmp-effort, org-cmp-time)
(org-cmp-ts, org-agenda-compare-effort): Use the new names.
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Fix
logic: only use 'or when including several categories as e.g.
'("+cat1" "+cat2").
This fixes 06cf532f4.
* lisp/org-agenda.el (org-agenda-filter-hook): New hook.
(org-agenda-finalize): Enhance docstring.
(org-agenda-filter): Use the new hook.
(org-agenda-filter-expand-tags, org-agenda-filter-apply): ):
Fix docstrings.
* etc/ORG-NEWS: Document the new hook.
* lisp/org-agenda.el (org-agenda-filter): Expand group tags.
(org-agenda-get-represented-tags): Consider group tags
represented when one tag of the group is represented.
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Don't use
an overlay to make the task invisible, use text properties.
(org-agenda--mark-blocked-entry): Add text property
'org-filter-type to later use `org-agenda-filter-hide-line' if
necessary.
(org-agenda-filter-hide-line): Fix docstring.
The related bug was first reported in 2013 by Matt Lundin here:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00072.html
Then Andrew Hyatt reported it again, and provided a minimal recipe on
how to reproduce it consistently.
Thanks a lot to both of them.
* lisp/org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug
when matching the text at the end of the line.
Thanks to Nathan Neff for reporting and investigating this bug.
* lisp/ox.el (org-export--dispatch-ui): Update message in the
header line to promote the use of C-v and M-v while SPC and
DEL are still allowed for backward compatibility reasons.
* lisp/org-macs.el (org-scroll): New function.
* lisp/org-attach.el (org-attach): Use `org-scroll'.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Allow C-v, M-v, C-n and C-p to scroll.
This change adverize C-v, M-v, C-n and C-p as the default keys
for scrolling the window, while SPC and DEL are still available
in the export dispatch window.
In particular, don't use SPC as a way to scroll the window in
the agenda commands dispatch window, as this key might be used
for a custom agenda command.
* lisp/org-macs.el (org-scroll): New function.
* lisp/ox.el (org-export--dispatch-action):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Use the new function.
* lisp/org.el (org-loop-over-headlines-in-active-region):
Mention `org-agenda-loop-over-headlines-in-active-region'.
* lisp/org-agenda.el (org-agenda-do-in-region): Use the
`region' face for the selected headline.
(org-agenda-loop-over-headlines-in-active-region): Mention
`org-loop-over-headlines-in-active-region'.
* doc/org-manual.org (Execute commands in the active region):
New section, documenting both
`org-loop-over-headlines-in-active-region' and
`org-agenda-loop-over-headlines-in-active-region' options.
* etc/ORG-NEWS (Looping agenda commands over headlines): Add
an entry about "Looping agenda commands over headlines".
* lisp/org-agenda.el (org-agenda-do-in-region): New function.
(org-agenda-maybe-loop): New macro.
(org-agenda-kill, org-agenda-archive-default)
(org-agenda-archive-default-with-confirmation)
(org-agenda-archive, org-agenda-archive-to-archive-sibling)
(org-agenda-archive-with, org-agenda-todo)
(org-agenda-set-property, org-agenda-set-effort)
(org-agenda-toggle-archive-tag, org-agenda-date-prompt)
(org-agenda-schedule, org-agenda-deadline)
(org-agenda-add-entry-to-org-agenda-diary-file): Use
`org-agenda-maybe-loop' to DTRT when the region is active.
(org-agenda-loop-over-headlines-in-active-region): New option.
* lisp/org-agenda.el (org-agenda-show-new-time): Fix infinite
loop while trying to show new time in hidden lines.
Thanks to Andrew Hyatt for reporting this.
* lisp/org-agenda.el (org-agenda-get-blocks): When both dates
are of the same value, assume this is a time to display for
each date in the range.
Thanks to David Masterson for reporting this.
* lisp/org-agenda.el (org-agenda-mode-map): Remap
'move-end-of-line to 'org-agenda-end-of-line.
(org-agenda-end-of-line): New command.
This fixes this bug: when moving to the end of line, if the next
line is hidden, changing the timestamp of the current headline would
not display the new time. This is also safer when archiving subtrees
and when performing actions on agenda headlines in general.
* lisp/org-agenda.el (org-agenda-archive-with): Bind
`org-archive-from-agenda' to `t' when archiving from agenda.
* lisp/org-archive.el (org-archive-subtree-save-file-p): New option.
(org-archive-subtree): Use the new option.
* doc/org-manual.org (Moving a tree to an archive file):
Mention the new option.
Thanks to Russ Allbery for suggesting a similar idea.
* lisp/org.el (org-font-lock-add-priority-faces): Use
`org-priority-regexp'.
(org-priority-regexp): Match multiple characters.
* lisp/org-agenda.el (org-agenda-fontify-priorities): Use
`org-priority-regexp'.
This commit paves the way for more flexibility in priority handling.
For example, `org-priority-[up/down]' could deal with priorities as
numbers (e.g. [#1]) instead of letters.
* lisp/org-agenda.el (org-agenda-ctrl-c-ctrl-c): Don't try to
deactivate columns as `org-columns-toggle-or-columns-quit' is
already bound to `C-c C-c' when the column view is active.
* lisp/org.el (org-ctrl-c-ctrl-c): Update docstring.
* lisp/org-agenda.el (org-agenda-ctrl-c-ctrl-c): New function.
This is to unify and thereby harmonize the behavior of C-c C-c with
regard to Org files and columns.
* lisp/org-agenda.el (org-agenda-mode): Fix bug: don't prevent the
use of M-x text-scale-mode RET.
Before this fix, M-x text-scale-mode RET was only available after
the agenda buffer was redone once. Now it is available immediately.
This fixes commit 00c1184a0.
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Use `or'
for category filters, `and' for other filters.
For example, when using `org-agenda-category-filter-preset' set to
'("+cat1" "+cat2"), using `and' in the filter matcher results in
displaying 0 headline, since no headline can have two categories.
* lisp/org-agenda.el (org-agenda-filter): Fix unescaped literal ‘+’ in
regexp. Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html
* lisp/org.el (org-clone-subtree-with-time-shift): Fix a regexp typo
that mishandled strings like ‘\1d’, reported by the same email.
2019-12-05 regexp lint fixes
4c933077157ba409d645f4649c8a3a8e534d53d5
Paul Eggert
Thu Dec 5 19:32:12 2019 -0800
* lisp/org-agenda.el (org-agenda-check-type): Mention also 'component'
in the error message since it could be just the unallowed component
in a composed agenda buffer from which some action has been
triggered.
* lisp/org-agenda.el: Bind `org-agenda-filter' to `/` and move
`org-agenda-filter-by-tag' to `\`.
* doc/org-manual (Filtering/limiting agenda items): Improve the entire
section.
* lisp/org-agenda.el (org-agenda-filter): Append new filter elements
instead of prepending them. And allow an additional leading `+' to
signal that the new elements should be added to the current filter
instad of replacing them.
* lisp/org-agenda.el (org-agenda-get-represented-categories):
New function.
(org-agenda-get-represented-tags): Added a caching mechanism.
* (org-agenda-all-categories): Removed again, deferring to
`org-agenda-get-represented-categories'.
* lisp/org-agenda.el (org-agenda-represented-categories)
(org-agenda-represented-tags): New variables.
(org-agenda-finalize): Remove the caches for represented tags
and categories.
* lisp/org-agenda.el (org-agenda-filter-by-tag): Remove duplicate
selection letters from tag filter prompt. If tag groups were the same
in multiple agenda files, the selection characters would be repeated
in the prompt.
* lisp/org-agenda.el (org-agenda-check-clock-gap):
* lisp/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve-clock, (org-clock-resolve)
(org-resolve-clocks, org-resolve-clocks-if-idle)
(org-clock-in, org-clock-out, org-clock-sum, org-clocktable-steps):
* lisp/org-element.el (org-element-cache-sync-duration)
(org-element--cache-set-timer, org-element--cache-interrupt-p):
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue, org-timer-set-timer):
* lisp/org.el (org-today, org-auto-repeat-maybe): Port time-related
changes from the Emacs repo by using compatibility wrappers.
In the Emacs repo, there has been a lot of changes to Org files
involving time-related code. I've ported some of those changes but
have largely ignored any changes that break compatibility with older
Emacsen that we support. That, however, isn't a good approach because
it will be hard to do a systematic update once we bump our minimum
Emacs requirement. Instead use the recently added compatibility
wrappers where needed, which is ugly but more maintainable.
The main time-related changes this leaves unported are changes that
replace (apply #'encode-time args) calls with (encode-time args).
Until the first form is unsupported, adding a compatibility function
doesn't seem worth the churn.
Relevant Emacs commits include
c75f505dea6a560b825384cf3d277690f86840bf,
57c74793c46c6533b63836f00aecaf3ac2accb6d,
988e37fa0f922b852715671d59a0e3f682373411,
476066e89d6f0bb87220da690b8a476bf9655b80,
89c63b3522b62c0fd725f0b348927a2069238452.
* lisp/org-agenda.el (org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-clock.el (org-clock-get-sum-start):
* lisp/org.el (org-current-time, org-store-link)
(org-read-date, org-read-date-display)
(org-display-custom-time, org-timestamp-to-time)
Simplify use of encode-time.
* lisp/org-clock.el (org-clock-in, org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes):
* lisp/org-macs.el (org-2ft):
* lisp/org.el (org-get-scheduled-time, org-get-deadline-time)
(org-add-planning-info, org-time-string-to-absolute)
(org-closest-date):
Use org-time-string-to-time instead of doing it by hand with
encode-time.
* lisp/org.el (org-read-date): Avoid extra trip through encode-time.
Simplify use of encode-time
988e37fa0f922b852715671d59a0e3f682373411
Paul Eggert
Sun Feb 10 23:54:35 2019 -0800
Note(km): org-current-time has been modified to use org-time-subtract
and org-time-less-p for backward compatibility. Some changes from
988e37fa0 have been dropped to keep encode-time's call compatible with
older Emacsen.
* lisp/org-agenda.el (org-agenda): Add a condition to check if
narrowing is in effect and in case set the agenda restriction markers.
* etc/ORG-NEWS (Respect narrowing when agenda command is restricted to buffer):
* doc/org-manual.org (The Agenda Dispatcher): Mention the behavior.
* lisp/org-agenda.el (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
Make `t' synonymous with `near' instead of `all' (as is stated in the
docstring).
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-archive.el (org-archive-to-archive-sibling):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org.el (org-set-visibility-according-to-property):
(org-move-subtree-down):
(org-paste-subtree):
(org-yank-generic):
* testing/lisp/test-org-inlinetask.el (test-org-inlinetask/folding-directly-consecutive-tasks/1): Use `org-flag-subtree' instead of `outline-hide-subtree'.
`outline-hide-subtree' leaves overlays on top of white spaces,
particularly at the end of the buffer. `org-flag-subtree' does not.
* lisp/org-agenda.el (org-agenda-breadcrumbs-separator): New variable.
(org-agenda-format-item): Use org-agenda-breadcrumbs-separator
* etc/ORG-NEWS (New variable: ~org-agenda-breadcrumbs-separator~): New variable.
* lisp/org-agenda.el (org-agenda):
* lisp/org-clock.el (org-clock-out, org-clock-display):
* lisp/org.el (org-refile):
Don’t trust arbitrary strings to not contain "%" or "`" in
(message (concat STRING1 STRING2 ...)).
Be safer about "%" in message formats
3739d51ef3b935b30e40ba4534fe362bc685865f
Paul Eggert
Thu Mar 7 09:05:56 2019 -0800
* lisp/org-clock.el (org-clock-out):
* lisp/org.el (org-evaluate-time-range):
Avoid double-rounding of time-related values. Simplify.
* lisp/org-clock.el (org-resolve-clocks-if-idle):
Use time-since instead of open-coding most of it.
* lisp/org-agenda.el (org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-table.el (org-table-sum):
* lisp/org.el (org-babel-load-file, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now):
Simplify.
Note(km): Many of the changes from 476066e89 have been dropped for
compatibility with older Emacsen.
Avoid some double-rounding of Lisp timestamps
476066e89d6f0bb87220da690b8a476bf9655b80
Paul Eggert
Fri Feb 22 18:33:57 2019 -0800
* doc/org-manual.org (Using Column View in the Agenda): Updated
reference to variable.
* lisp/org-agenda.el (org-agenda-finalize): Set buffer local variable
instead.
* lisp/org-colview.el (org-overriding-columns-format): Renamed.
(org-agenda-overriding-columns-format): Renamed.
(org-local-columns-format): New buffer local variable.
(org-columns-edit-value): Updated reference to variable.
(org-columns-next-allowed-value): Updated reference to variable.
(org-agenda-columns): Updated reference to variable.
Setting org-agenda-overriding-columns-format as a buffer local value
interferes with how it is used as a dynamically scoped var, so use a
separate variable for buffer local setting.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
when no matcher was specified there is no point in showing
a trailing colon (and space).
* lisp/org-agenda.el (org-agenda-get-scheduled): Use the face.
This has the effect that if you just did the habit, it is "greyed out"
in the agenda.
TINYCHANGE
* lisp/org-habit.el (org-habit-scheduled-past-days): New variable
* lisp/org-agenda.el (org-agenda-get-scheduled): override
`org-scheduled-past-days' for habits if
`org-habit-scheduled-past-days` is not nil
TINYCHANGE
* lisp/org-agenda.el (org-agenda-to-appt):
* lisp/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org-colview.el (org-columns-edit-value, org-columns)
(org-agenda-columns):
* lisp/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el ((org-timer-show-remaining-time):
* lisp/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe)
(org-small-year-to-year, org-goto-calendar):
* lisp/ox.el (org-export-insert-default-template):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
Prefer nil to (current-time) when either works
c75f505dea6a560b825384cf3d277690f86840bf
Paul Eggert
Fri Oct 20 19:42:23 2017 -0700
Note(km): The changes that will reverted in the next commit have been
dropped from the ChangeLog entries above.
* 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
* lisp/org.el (org-mode): Add special invisibility spec for drawers.
(org-show-set-visibility): Handle new invisibility spec.
(org-clean-visibility-after-subtree-move): Fix argument for
`org-cycle-hide-drawers'. `overview' is a no-op.
(org-cycle-hook):
(org-cycle-internal-local):
(org-flag-drawer):
(org-move-subtree-down):
(org-show-entry):
* lisp/org-agenda.el (org-agenda-clock-in):
* lisp/org-clock.el (org-clock-goto):
* lisp/org-feed.el (org-feed-update):
* lisp/org-inlinetask.el (org-inlinetask-toggle-visibility): Do not hide
drawers when expanding a headline.
Drawers and headlines visibility are now unrelated. As a consequence,
there is no need to hide drawers every time a headline is expanded.