Use case: do not add a workload report (which usually contains links to all
current tasks) when inserting checklist backlinks; they do not carry any
information and are thus not relevant.
This is the expected behavior: when no start date is given, it should default to
today (the whole day), and not exactly now, so that day increments do not start
in the mid of the day, yielding misleading results.
When refreshing the Org agenda without completing redrawing it (i.e, by calling
`org-agenda-filter-by-tag`), effort estimates where added for every refreshing,
causing them to stack up. We now check whether a summed effort estimate is
already present and remove it before adding it again.
(Maybe one could also just skip the effort recalculation if the a summed effort
estimate is already present, but I am not sure whether this will cause display
inconsistencies when new events are added or old ones are deleted.)
Turns out `org-store-link` actually returns something and other code (e.g.,
`org-capture`) depends on this. Fix this, and on the way also recognize the
special case where `org-store-link` does not update `org-stored-links`.
This way the original function definition is left intact and can be found via
the help buffer.
The manual overwrite of `org-ql--link-regexp` has been left as it is, as it's a
`cl-defun` definition and I am not quite sure how turn this into an ELisp around
advice without breaking things.
The manual fix for `enriched-decode-display-prop` has also been left untouched,
maybe this should be an around advice as well?
From my point of view, this makes it clearer that the functions thus defined are
not meant to be used anywhere else.
Some one-time `advice-add` calls are still there, though, mostly because the
associated functions would be too long to inline them directly into their
present locations.
When adding a link to an item via `org-store-link`, and the link is not known
yet, the links is always put at the beginning of the list of currently known
links, as stored in `org-stored-links`. This allows to conveniently insert this
link via `org-insert-link` by just choosing the first element of the list, which
is selected by default.
However, when the link to the requested item is already present in
`org-stored-links`, the link is not pushed to the beginning of
`org-stored-links` by `org-store-link`, but kept where it is. When calling
`org-insert-link` to insert a link to the item, manual selection of the correct
link is required, which is annoying and unnecessarily interrupting the current
workflow. Even worse, when overlooking the notification that the link is
already stored, one will assume that the link to the requested item is at the
top of `org-stored-links` (which is isn't), subsequently inserting false links
when blindly calling `org-insert-link`. (Yes, this has happend to me …)
This patch fixes this issue by ensuring that links to items (regardless whether
they have already been known or not) are always put at the front of the
`org-stored-links`. This patch also removes the rarely used
`db/org-clear-stored-links` function, whose purpose was to provide some kind of
workaround, but turned out not to be convenient enough to actually be
used (because it also removed potentially useful links when clearing the cache).
The original version of `grep-read-files` includes file names in its default
values, giving an irritating completion candidate list when used with ivy.
Changed this to just let `completing-read` do the completion itself.
This is supposed to be the dual to DEADLINE, and shall someday release the
SCHEDULED property from its semantics to not display things before a certain
date (then the SCHEDULED property can be solely used to mean that things should
be done on a specific date).
However, the NOT_BEFORE property needs some more consistency checks, as
otherwise items that have a NOT_BEFORE property that's too far in the future may
be overlooked. Is this something for the monthly review?
Always use property matches for this, as it's more direct to me to understand
what the actual search criteria are (even if these are a bit slower). Also use
`<today>` instead of `<now>` to ignore the time part and always fall back to
00:00 time; this should avoid intra-day changes of whether an item appears on a
list or not.
These definitions are easily covered by the global setting of
`org-agenda-prefix-format` and can thus also be customized now. Note that this
yields some extra space with the default setting, as the entries of the custom
project agenda usually do not have an effort property set – but I think this is
easily bearable.
This is to signify that an Org mode item has been merged into another item,
indendent of whether the items itself has been done yet, is still in progress,
or has been cancelled.
This advice is experimental. It should actually not move point, but after
executing `org-agenda-redo-all`, point is at the first position of the buffer.
Further investigation necessary.
We are now not merely copying a template from another item, but more abstractly
insert a checklist consisting of backlinks and a template. Update docstring and
function name to reflect that, but keep the old name of `db/org-copy-template`
as an obsolete alias.
Experimental
Backlinks are an integral part of the checklist for the item at point, so why
not include them per default?
Copying is for now done unconditionally and without any customization. If those
will turn out necessary, then they will be added later.