* lisp/org-agenda.el (org-agenda-change-all-lines): Preserve bulk mark
overlay when replacing an entry.
Reported-by: Jesse Johnson <holocronweaver@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107299>
* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
template to recognize that the code expects this alist's elements to be
two-element lists like (?a b), not conses like (?a . b).
The Customize UI previously incorrectly presented the latter. When
saved, this led to the agenda bulk-commands menu correctly presenting
the accelerator key 'a' but then erroring when it tried to execute the
associated command 'b'.
* lisp/org.el (org-show-context-detail): Change default visibility span
for agenda context.
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-todo):
(org-agenda-add-note):
(org-agenda-priority):
(org-agenda-set-tags):
(org-agenda-set-property):
(org-agenda-set-effort):
(org-agenda-toggle-archive-tag):
(org-agenda-clock-in): Special visibility is taken care of by
`org-show-context'. Do not hard-code anything else.
* contrib/lisp/org-contacts.el (org-contacts-gnus-article-from-goto):
Special visibility is taken care of by `org-show-context'. Do not
hard-code anything else.
* lisp/org-agenda.el (org-agenda-mark-clocking-task):
(org-agenda-clock-goto): `org-clock-current-task' may not be defined, so
check that first.
Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106504>
* lisp/org.el (org-current-tag-alist): New variable.
(org-set-tags):
(org-global-tags-completion-table):
(org-agenda-prepare-buffers): Use new variable.
(org-set-regexps-and-options): Use new variable. Handle STARTUP early
so that "#+STARTUP: noptag" is taken into consideration.
* lisp/org-agenda.el (org-agenda-bulk-action): Use new variable.
* lisp/org-mobile.el (org-mobile-create-index-file): `org-tag-alist' is
no longer buffer-local.
* testing/lisp/test-org.el (test-org/set-regexps-and-options): Add
tests.
* lisp/org-agenda.el (org-agenda-bulk-action): Fix rescheduling TODO items with `org-log-reschedule' set to `note'.
Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/105591>
* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
curvy quotes in help echo (in emacs 25.1).
* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.
The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):
http://thread.gmane.org/gmane.emacs.orgmode/105594
Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).
So below will render that single quote as curly.
(message "C-c '")
The fix (Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html)
is to print that quote verbatim using the "%s" modifier:
(message "%s" "C-c '")
Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that. Instead \\[COMMAND]
should be used directly in the string.
* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Remove command
because this functionality is redundant with org-agenda-filter-by-tag
as of 6c6ae99.
Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>
* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Refine rather
than exlude tags, reverting change from 6c6ae99. Mark as obsolete
because this functionality is now redundant with
org-agenda-filter-by-tag.
Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>
* lisp/org.el (org-make-tags-matcher): Return a function instead of
a sexp. Refactor code.
(org--matcher-tags-todo-only): New variable. Replace `todo-only'
dynamic binding.
(org-scan-tags): Apply changes to `org-make-tags-matcher'.
(org-match-sparse-tree):
(org-map-entries): Use new variable.
* lisp/org-crypt.el (org-encrypt-entries):
(org-decrypt-entries): Use new variable.
* lisp/org-clock.el (org-clock-get-table-data): Apply changes to
`org-make-tags-matcher'.
* lisp/org-agenda.el (org-tags-view): Use new variable.
* lisp/org-agenda.el (org-agenda--quit): Fix changes introduced by
9b1c682 and 8594aed that incorrectly assume that the agenda buffer is
always the current buffer at the time of killing or burying.
Reported-by: David Mann <manndmd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103791>
* lisp/org-agenda.el (org-agenda-write): Fix arguments passed to
`org-agenda-remove-marked-text' to properly remove entries with
`invisible' property set to `org-filtered'.
* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Always
include TODO entries in the output. The motivation is that a user not
filtering out TODO or DONE items in the current agenda probably wants
them in the output.
Reported-by: "sgeorgii ." <sgeorgii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102998>
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Deal with
the case when the user provided an empty string to filter or exclude
rows from the agenda.
This is done in order to fix a problem reported in emacs-orgmode mailing
list 2015-11-25 02:50 with subject "[O] [RFC] [PATCH] Changes to Tag
groups - allow nesting and regexps".
* lisp/org-agenda.el (org-agenda--timestamp-to-absolute): New function.
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): Use new function.
* lisp/org.el (org-diary-sexp-no-match): New error.
(org-time-string-to-absolute): Raise an error when a diary sexp cannot
match instead of returning a nonsensical value.
Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102417>
* lisp/org-agenda.el (org-agenda-get-day-entries): Rewrite function to
avoid O(n^2) complexity. Also fix empty deadline list passed as
argument when :deadline (or :deadline*) is not the first symbol.
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): When closest scheduled/deadline date is
today, also report all days since original timestamp.
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): For past repeaters, compute the number of
scheduled or deadline days since original date, not closest repeater.
Suggested-by: cesar mena <cmena@pobox.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101884>
Protect apostrophes not covered by the last backport. Convert
expressions like '(...) to \\='(...) and symbols written as 'name to
`name'. (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)
If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.
<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
These changes are the combination of the commits below (in order
applied). Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits. Changes to message and help quote
display for Emacs 25 seem to be here to stay. The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.
Quoting fixes in lisp/org
6cd2629bd1b3ce77d29ac28e29237c94a4197116
Paul Eggert
Mon Aug 31 00:29:40 2015 -0700
More-conservative ‘format’ quote restyling
fbb5531fa11d13854b274d28ccd329c9b6652cfc
Paul Eggert
Sun Aug 23 22:39:06 2015 -0700
Prefer directed to neutral quotes
875a5d0ead827d3da32ecbd30e739a29f07bbc87
Paul Eggert
Mon Aug 24 23:57:25 2015 -0700
Escape ` and ' in doc
19532d147b431a4fe34f088d6de07891c48e2c5c
Paul Eggert
Tue Sep 1 18:23:21 2015 -0700
Fix some more docstring etc. quoting problems
26bd978d87dfbf9baa115cd961a67d42b416c4bf
Paul Eggert
Thu Sep 3 15:32:54 2015 -0700
Go back to grave quoting in source-code docstrings etc.
6afef3f6ca2f3009c722b84e249903b7f807b044
Paul Eggert
Mon Sep 7 16:09:27 2015 -0700
* lisp/org-agenda.el (org-agenda-kill-all-agenda-buffers): Remove
reference to stale key binding.
This binding was removed in 39c7630 (Clean up local variable stuff and
document sticky agenda buffers, 2012-03-10).
* lisp/org-agenda.el (org-agenda-filter-by-category): Documentation of
the effect of the prefix argument.
* doc/org.texi (Filtering/limiting agenda items): Documentation about
the effect of the prefix argument when filtering by category.
* lisp/org-agenda.el (org-agenda-goto): Fix function to work with
non-Org buffers. Otherwise `org-agenda-follow-mode' does not work
correctly with included diary entries (e.g., it errors out while the
cursor is still in the diary buffer).
Follow mode does not work with diary entries in the agenda. It calls
`org-agenda-goto', which expects to be in an Org mode buffer but does not
test to make sure that it is in an Org buffer. As a result, it errors
out midway through and leaves the cursor stranded in the diary buffer.
* org-agenda.el (org-agenda-insert-diary-strategy): Add new value
'date-tree-last.
(org-agenda-insert-diary-make-new-entry): Handle
`org-agenda-insert-diary-strategy' set to 'date-tree-last.
To allow for diary entries to be entered in time order in the date tree,
add a new value to `org-agenda-insert-diary-strategy' that allows for
this. The code for handling this value, 'date-tree-last, is a bit
tricky, as we need to keep track of whether the date-tree already had
one or more entries for the given date.
* org-agenda.el (org-agenda-maybe-redo): Test for
org-agenda-this-buffer-name as well.
The Agenda buffer will have a different name if it’s in sticky mode,
but some commands that alter the agenda should still redo it, for
example, org-agenda-remove-restriction-lock, just like
org-agenda-filter-by-category does.
* lisp/org-agenda.el (org-agenda-switch-to): Do not hardcode visibility
set-up when switching to item relative to current agenda line.
Instead let `org-show-context' handle it. Improve docstring.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99616>
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check if an
entry can be blocked when it doesn't have any TODO keyword.
* lisp/org.el (org-entry-blocked-p): Make sure entry is really an open
task before even considering it as a blocked task. Small refactoring.
* testing/lisp/test-org.el (test-org/entry-properties): Update tests.
(test-org/entry-blocked-p): New test.
Reported-by: Bingo UV <right.ho@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99544>
* lisp/org-agenda.el (org-agenda-prepare): Use the correct key for
category filter.
`org-agenda-prepare-window' uses 'cat whereas `org-agenda-prepare' used 'car.
* lisp/org-agenda.el (org-agenda-prepare): Fix non-persistent filters when refreshing sticky agenda
When a sticky agenda is buried, then reviving and refreshing, existing
filters are ignored even when org-agenda-persistent-filter is `t'.
Reported and fixed by Daniel Borchmann
Filtering in the agenda on grouptags filter also subcategories.
Exception if filter is applied with a (double) prefix-argument.
Filtering in the agenda on subcategories does not filter the "above"
levels anymore.
If a grouptag contains a regular expression the regular expression
is also used as a filter.
* lisp/org-agenda.el (org-agenda-filter-by-tag): improved UI and
refactoring.
Now uses the argument arg and optional argument exclude instead of
strip and narrow. ARG because the argument has multiple purposes
and makes more sense than strip now. The term narrowing is changed
to exclude.
* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): name change in
argument to match org-agenda-filter-by-tag.
* lisp/org-agenda.el (org-agenda-filter-make-matcher): new optional
argument EXPAND and refactoring.
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): new
function, previously baked into org-agenda-filter-make-matcher.
* lisp/org-agenda.el (org-agenda-filter-apply): New optional parameter
EXPAND, used in call to org-agenda-filter-make-matcher.
* lisp/org-agenda.el (org-agenda-reapply-filters): Uses another
parameter (the new optional one) in call to org-agenda-filter-apply.
* lisp/org-agenda.el (org-agenda-finalize): use of new parameter in
call to org-agenda-filter-apply.
* lisp/org-agenda.el (org-agenda-redo): Use of new parameter in call
to org-agenda-filter-apply.
* lisp/org.el (org-show-context-detail): New variable.
(org-context-choice, org-show-following-heading, org-show-siblings,
org-show-entry-below, org-show-hierarchy-above): Remove variables.
(org-show-set-visibility): New function.
(org-convert-to-oddeven-levels, org-get-location, org-show-context,
org-reveal): Use new function.
(org-link-search): Update docstring.
* lisp/org-agenda.el (org-agenda-cycle-show): Use new function.
(org-agenda-show): Replace missing variable.
* testing/lisp/test-org.el (test-org/show-set-visibility): New test.
* doc/org.texi (Sparse trees):
* doc/orgguide.texi (Sparse trees): Document changes.
* etc/ORG-NEWS: Signal changes.
Configuration of `org-show-context' is done with a single variable
offering six different views, instead of four variables for a total
of 16 configurations.
* lisp/org.el (org-scan-tags): Fix agenda org tags scans to properly
add timestamp property, completely analogously to
org-agenda-get-todos.
* lisp/org-agenda.el (org-agenda-entry-get-agenda-timestamp,
org-agenda-get-todos): Factored timestamp retrieval code out to
separate function org-agenda-entry-get-agenda-timestamp from
org-agenda-get-todos.
Before this fix, timestamps were ignored when sorting agenda views of
the 'tags' and 'tags-todo' types.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level):
* lisp/org.el (org-link-search): Call `org-insert-heading' instead
of (insert "* ").
This allows, in particular, to run `org-insert-heading-hook' and
possibly fix up blank lines around.
* lisp/org-agenda.el (org-agenda-new-marker): Make sure data inserted
inserted in the heading above marker updates it.
(org-agenda-bulk-action): Enforce calling `org-add-log-note' after
each action.
Reported-by: Maxim Baz <z0rch.coding@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94654>
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Do not
save excursion or final position is lost.
Reported-by: Gregor Zattler <grfz@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/94543>
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level): Make
use of `org-insert-heading' instead of inserting the * character
Therefore, the hooks associated to the insertion of a heading will be
triggered. Since those hooks may cause the creation of some
metadata. `org-end-of-meta-data' is used afterward.
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Ensure
point is at a real body line and not in front of meta data, so
regular contents can be inserted safely after a call to this
function.
Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94482>
* lisp/org-clock.el: Replace occurances of
'calendar-absolute-from-iso' with 'calendar-iso-to-absolute'.
* lisp/org-agenda.el: Same as above.
* lisp/org.el: Same as above.
Some (long marked obsolete) calendar entities have been dropped from
Emacs recently. One of those is 'calendar-absolute-from-iso'.
* lisp/org-agenda.el (org-agenda-prepare-window): Update window
configuration even when agenda buffer exists in background.
* lisp/org-agenda.el (org-agenda-Quit): Use buffer value for
org-agenda-pre-window-conf to allow for local values used with sticky
agenda buffers.
* lisp/org-agenda.el (org-agenda-quit): Reset local, not global, value for
org-agenda-pre-window-conf.
* lisp/org-agenda.el (org-agenda--quit): New function.
Update the pre-agenda window configuration on the next agenda call even
if org-agenda-pre-window-conf is non-nil (which occurs when the agenda
buffer is exited without q, Q, or X). This prevents restoring a window
configuration that is not the one prior to the most recent agenda call.
Make org-agenda-Quit (Q) restore the buffer-local, not the global, value
for org-agenda-pre-window-conf so that it works correctly with sticky
agenda buffers.
Along with these changes, merge the duplicated functionality of
org-agenda-quit and org-agenda-Quit into a new function,
org-agenda--quit.
* lisp/org-agenda.el (org-agenda-tree-to-indirect-buffer): Record last
indirect buffer for agenda.
* lisp/org-agenda.el (org-agenda-quit): Delete window for
org-agenda-last-indirect-buffer, not org-last-indirect-buffer.
Introduce a new variable, org-agenda-last-indirect-buffer, that is
specific for the agenda (and perhaps a particular agenda buffer, if
org-agenda-sticky is set). This prevents org-agenda-quit from deleting
a window if it is displaying a buffer that was created through a
org-tree-to-indirect-buffer call outside of
org-agenda-tree-to-indirect-buffer.
Make org-agenda-Quit check for indirect buffer windows, like
org-agenda-quit does.
* lisp/org-agenda.el (org-agenda-Quit): Remove unnecessary function calls.
- org-agenda-Quit turns off column view if it is active, instead of
killing the agenda buffer, so there is no need to call
org-columns-remove-overlays when killing the buffer.
- org-agenda-reset-markers is already called when the kill-buffer-hook
is run.
* lisp/org-agenda.el (org-agenda-exit): Exit column view before trying to
exit agenda.
Running org-agenda-exit in column view deleted all buffers loaded by the
agenda, but it didn't actually exit the agenda because, if the agenda is
in column view, org-agenda-Quit turns off column view instead of killing
the agenda. So org-agenda-exit should either just quit column view if
it is active (and not delete the loaded buffers or quit the agenda) or
make sure that the agenda is not in column view before killing it.
Since org-agenda-Quit and org-agenda-quit already do the former, make
org-agenda-exit completely exit the agenda regardless of whether it is
in column view.
* lisp/org.el (org-todo-yesterday):
* lisp/org-agenda.el (org-agenda-todo-yesterday): Ignore global
`org-use-effective-time' value.
Otherwise, if `org-use-effective-time' being nil,
`org-extend-today-until' will not be considered, resulting in the
current time being used instead of 23:59 yesterday.
Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93224>
* lisp/org.el (org-insert-labeled-timestamps-at-point): Remove
variable.
(org-add-planning-info): Remove reference to removed variable.
* lisp/org-agenda.el (org-agenda-schedule, org-agenda-deadline):
Remove reference to removed variable.
* etc/ORG-NEWS (Skipping): Document removal.
Org syntax assumes planning info line is always right below the
headline. Setting this variable to anything but nil defeats that and,
as a consequence, produces invalid planning lines.
* lisp/org-agenda.el (org-agenda-phases-of-moon, org-agenda-holidays):
Update to use the current API
This commit fixes the display of holidays in the agenda for emacs 25.
Further for getting the lunar phases the usage of an obsolete alias
has been replaced by the current name.
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
display function. Drop the usage of the obsolete diary-display-hook.
fancy-diary-display has been dropped in Emacs 25. diary-fancy-display
is the long known replacement of fancy-diary-display.
diary-display-hook has been marked obsolete before Emacs 23.2.
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
display function. Drop the usage of the obsolete diary-display-hook.
fancy-diary-display has been dropped in Emacs 25. diary-fancy-display
is the long known replacement of fancy-diary-display.
diary-display-hook has been marked obsolete before Emacs 23.2.
* lisp/org-agenda.el (org-agenda-bulk-mark,
org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): This fixes
e.g. org-agenda-bulk-mark-all when time-grid is shown.
TINYCHANGE
* lisp/ox-icalendar.el (org-icalendar-create-uid): Remove unused
optional argument.
(org-icalendar--combine-files): Change signature. Simplify process.
(org-icalendar-combine-agenda-files): Apply signature change. Do not
check anymore ICALENDAR-MARK property.
(org-icalendar-entry): Do not check anymore ICALENDAR-MARK property.
(org-icalendar-export-to-ics): Comply to comments.
(org-icalendar-export-current-agenda): Rewrite function.
* lisp/org-agenda.el (org-agenda-write): Update docstring.
Instead of parsing every agenda before picking up needed entries, copy
these entries in a temporary buffer, then export it.
* lisp/org-agenda.el (org-agenda-write): Write headings in proper
order.
`org-paste-subtree' leaves point before inserted text, so there is no
need to reverse contents.
http://permalink.gmane.org/gmane.emacs.orgmode/89867
* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.
Note: This calls for some refactoring in the filter area.
* org-agenda.el (org-agenda-finalize-entries): Remove spurious
variable in the (let ...) construct.
(org-agenda-limit-interactively): Allow to remove the
limitation by passing a universal prefix argument. Enhance
the prompt.
* org-agenda.el (org-agenda-prepare-window): New parameter
`filter-alist' to set the filters correctly when
`org-agenda-persistent-filter' is on.
(org-agenda-prepare): Use the new parameter for
`org-agenda-prepare-window'.
Thanks to Thomas Morgan for reporting this.
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.
* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.
Thanks to Thomas Morgan for reporting this.
* org-agenda.el (org-agenda-set-restriction-lock): Remove
restriction lock before setting it.
This fixes a small bug: when restriction lock is active on a subtree
and C-c C-x < before the first headline, the new restriction is set to
the entire file, but the old one was still present.
* org-agenda.el (org-agenda-format-item): Don't add the
'effort and 'effort-minutes text properties as they are
already accessible through the 'txt property of agenda lines.
* org-clock.el (org-clock-in): Refresh both the 'effort and
'effort-minutes text properties.
* org-rmail.el (rmail, rmail-file-name): Silent byte-compiler.
* org.el (org-refresh-properties): Allow to set several text
properties by passing an alist to the TPROP argument.
(org-set-effort, org-property-next-allowed-value): Use 'effort
instead of 'org-effort.
(org-agenda-prepare-buffers): Update both 'effort and
'effort-minutes.
(org-mark-jump-unhide): Move up to silent the byte-compiler.
* org.el (org-refresh-category-properties): Don't put the
'org-category-position property.
(org-refresh-stats-properties): New function.
(org-agenda-ignore-properties): Rename from
`org-agenda-ignore-drawer-properties', which is now obsolete.
Allow to use 'stats.
(org-agenda-prepare-buffers): Check stats properties.
(org-get-at-bol): Make a defsubst.
(org-get-at-eol): New function.
* org-agenda.el (org-entries-lessp): Sort by statistic
cookies.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Don't set
the 'org-category and 'org-category-pos text properties.
'org-category-pos is useless and 'org-category is set through
`org-agenda-format-item'.
(org-agenda-format-item): Remove useless code.
(org-cmp-priority): Delete.
(org-cmp-values): New function to compare text properties
values.
(org-cmp-effort, org-agenda-to-appt): Check against the end of
the line.
(org-agenda-filter-by-category, org-agenda-filter-apply)
(org-agenda-change-all-lines): Use `org-get-at-eol'.
* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-top-headline-filter'.
(org-agenda-filter-by-category): Fix syntax.
(org-agenda-filter-show-all-top-filter): New function.
(org-agenda-filter-by-top-headline)
(org-agenda-filter-remove-all): Use the new function.
(org-agenda-filter-top-headline-apply): Use a dedicated symbol
`top-headline'.
Thanks to Greg Troxel who provided a preliminary patch.
* org-agenda.el (org-agenda-write): Code cleanup.
(org-agenda-mark-filtered-text)
(org-agenda-unmark-filtered-text)
(org-agenda-fix-tags-filter-overlays-at): Delete.
(org-agenda-remove-marked-text): Use the `property' argument
instead of hard-coding 'org-filtered.
(org-agenda-filter-remove-all): Use `org-agenda-finalize'.
(org-agenda-filter-hide-line): Rewrite using text properties
instead of overlays.
(org-agenda-remove-filter): New function.
(org-agenda-filter-show-all-tag)
(org-agenda-filter-show-all-cat)
(org-agenda-filter-show-all-re): Rewrite using
`org-agenda-remove-filter'.
* org-agenda.el (org-agenda-mode): Disable `indent-tabs-mode'.
(org-agenda-dim-blocked-tasks): Make overlays intangible.
(org-agenda-show-new-time): Fix bug when deleting a timestamp
right after changing it.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)
(org-agenda-get-sexps, org-agenda-filter-by-regexp)
(org-agenda-filter-top-headline-apply): Fix indentation.
Thanks to Fletcher Charest and Nick Dokos for reporting issues
in this area.
There is one bug left: in a filtered agenda, changing a timestamp
will not always correctly display the warning. This happens when
the headline at point is followed by hidden headlines, because
`org-agenda-show-new-time' tries to set a text property at a
point where there is an overlay that hides then text. Because
the overlay is now intangible, the warning text will be displayed
too far on the right, and may be outside of the window.
* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.
Thanks to Matt Lundin for reporting this.
* org-agenda.el (org-agenda-filter-hide-line): Hide from the
beginning of the line to the beginning of the next line.
(org-agenda-show-new-time): Use `move-beginning-of-line' and
`move-end-of-line'.
(org-agenda-drag-line-forward): Adapt to the new definition of
hidden filtered lines.
Thanks to Igor Sosa Mayor for reporting this bug and to Nick Dokos
and Matt Lundin for providing further information.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.
* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.
* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.
This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.
Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.
`org-agenda-change-all-lines' is narrowing to the line it needs to
update. In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed. We
use `save-window-excursion' to ensure the window state is restored
correctly.
Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
* org-agenda.el (org-agenda-open-link): Don't throw an error
when trying to open a link when the point is on a place that
is not associated with a buffer.
* lisp/org-agenda.el (org-agenda-get-scheduled): If
`org-agenda-skip-scheduled-if-deadline-is-shown' is set to
'repeated-after-deadline, still show tasks without any deadline
The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task. This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.
TINYCHANGE
* org-agenda.el (org-agenda-find-same-or-today-or-agenda): Use
`org-agenda-backward-block'.
(org-agenda-backward-block): Renamed and rewritten from
`org-agenda-goto-block-beginning'.
(org-agenda-forward-block): New command.
(org-agenda-mode-map): Remap `backward-paragraph' and
`forward-paragraph' to `org-agenda-backward-block' and
`org-agenda-forward-block' respectively.
Thanks to Bart Bunting for raising this.
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-toggle-archive-tag)
(org-agenda-todo, org-agenda-priority, org-agenda-clock-in)
(org-agenda-clock-out): Put the cursor back on the correct
column, when possible.
(org-agenda-todo): When `org-clock-out-when-done' is `t', also
remove the current clock overlay.
* org-agenda.el (org-agenda-regexp-filter-preset): Fix
typo in docstring.
(org-agenda-reapply-filters): New function.
(org-agenda-drag-line-forward): Rewrite to fix a bug when used
in filtered agendas.
(org-agenda-drag-line-backward): Rewrite using
`org-agenda-drag-line-forward'.
Thanks to Thomas Morgan for reporting this.
* org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
`later than any date' instead of `later than today'.
Thank to Michael Crouch for reporting this and to Michael Hoffman for
providing the fix.
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
`org-clock-update-time-maybe´, `org-clock-remove-overlays´,
`org-babel-tangle-file´, `org-table-blank-field´,
`org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
`org-table-end´. Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
uses.
* org-macs.el (org-autoload): Delete.
* org-docview.el ("docview"): Fix declarations and require
doc-view directly.
* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.
Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.