A new hook is introduced, `org-agenda-before-write-hook'.
A function that ca be added to this hook is
`org-agenda-add-entry-text'. When this is done, each of the entries
shown in the agenda is amended with text that in the original buffer
is part of the entry text below the headline. Drawers are not copied,
and also the line with scheduling and deadline information is not
used. Finally, the number of ines to be added is imited by
`org-agenda-add-entry-text-maxlines'.
If the headline contains a time-of-day in one format or another, it
will be used to sort the entry into the time sequence of items for a
day. Some people have time stamps in the headline that refer to the
creation time or so, and then this produces an unwanted side effect.
If this is the case for your, use the new option
`org-agenda-search-headline-for-time' to turn off searching the
headline for a time.
John Rakestraw writes:
> I noticed today that, at least in my set-up, setting these variables
> this way:
>
> (setq org-agenda-dim-blocked-tasks 'invisible)
> (setq org-enforce-todo-checkbox-dependencies t)
>
> means that a TODO task with checkboxes doesn't get included in the
> agenda. However, the sub-tasks in the checkbox list don't get included,
> either. So the TODO task with checkboxes doesn't show up in the agenda.
>
> It makes sense given the way the variables work. However, I wonder if
> it makes more sense for a task with checklisted sub-tasks to be
> included in the agenda so that the tasks and sub-tasks don't get lost.
> Or, to put the point slightly differently, I think that a TODO that's
> blocked because it has dependent TODOs might be treated differently in
> agenda listings than a TODO that's blocked because it has dependent
> checklist items.
>
> Not a big deal to me because I don't typically use checkboxes for TODO
> items. But I thought I'd raise it for consideration.
I agree with this view and the commit implements exactly this.
The variables `org-agenda-todo-ignore-deadlines' and
`org-agenda-todo-ignore-with-date, and
`org-agenda-tags-todo-honor-ignore-options' are now all mentioned in
the docs.
The commands org-agenda-show can now be used to show varying degrees of
context when called with a prefix argument. `0 SPC', `1 SPC', ... `4
SPC'.
The new command `org-agenda-cycle-show' shows different amounts of
context when called several times in succession.
Christopher Suckling reports that todo state sorting doe not work in
block agenda. The reason for this that the variable
`org-todo-keywords-for-agenda' which is supposed to be a lost of all
keywords of all buffers contributing to the agenda, is not correct
during the construction of a block agenda.
Therefore, this commit instructs the todo state comparison function to
refer back to the original buffer for a list of todo keywords.
When org-depend.el is loaded, running the blocker hook will already
toggle a tag. However, when dimming the agenda, we do not want that.
Reported by Dan Griswold.
The variables =org-agenda-todo-ignore-with-date=,
=org-agenda-todo-ignore-with-date=, and
=org-agenda-todo-ignore-with-date= make it possible to
exclude TODO entries which have this kind of planning info
associated with them. This is most useful for people who
schedule everything, and who use the TODO list mainly to find
things that are not yet scheduled. Thomas Morgan pointed out
that also the tags-todo search may serve exactly this
purpose, and that it might be good to have a way to make
these variables also apply to the tags-todo search. I can
see than, but could not convince myself to make this the
default. A new variable must be set to make this happen:
=org-agenda-tags-todo-honor-ignore-options=.
An agenda series can have a set of global options. Matt Lundin
reported that these options to not work completely. There reason was
that, when calling `org-finalize-agenda' for a series, the dynamic
binding of those options was already off again. This commit makes
sure that these bindings are available also during this final step.
A new perl program, list-hooks.pl, now extracts the full list of hook
and function variables in Org, for inclusion into Worg's org-hooks.org.
Also, add a docstring to a few hooks that did not have one.
A prefix argument to the `org-agenda-show' command is now interpreted
to make sure the entire entry is made visible in the other window, not
only the headline.
Updating agenda lines did display tags incorrectly, because it used
the list of tags available as a property to remake the list. However,
that list contains down-cased versions of the tags, because all the
filtering in the agenda does ignore case in tags.
This patch implements a fresh scan for the tags each time a line is
updated, and in this way fixes the problem. It also reverses a
previous attempt to fix a similar problem.
Samuel Wales writes:
> It would be really nice if you could set tags to different
> faces the way you can with todo keywords.
>
> For example, you could set :urgent: to a bright color. Or
> set a face for all contexts.
This patch add a new customization variable `org-tag-faces' that can
be used to specify such faces. The rest of the patch implements these
new faces in Org-mode buffers as well as in the agenda.
This patch does a lot of things. First, it makes sure that the tags
transferred to the agenda as text properties on each line are do carry
information about there origin (in the form of an `inherited' text
property). Then it modifies the function creating agenda lines so
that inherited tags will be listed and identified as such in the
agenda.
This new feature can be turned off with a new variable,
`org-agenda-show-inherited-tags'.
If you set the variable `org-completion-use-ido' to t, and if you have
ido-mode turned on, most instanced of completion in Org-mode will use
ido-complete.
Thanks to Samuel Wales and Eric Schulte for patches to this effect.
Georg C.F. Greve asked for configurable leaders strings for agenda
display of time ranges. This patch implements these strings, in the
new option `org-agenda-timerange-leaders'.
Bernt Hanses writes:
This changes the default value for Effort during agenda filtering so
that an undefined Effort value is treated as 0 instead of nil. Tasks
with no effort defined now return zero effort when selecting tasks for
the filter.
There was effectively no way to select 'tasks with no effort defined'
using the agenda effort filter. The '<' operator is interpreted as
'<=' and the default effort selection defined in
org-agenda-filter-by-tag starts with zero ("0 0:10 ...") so this
change just treats tasks with no effort defined the same as tasks with
an effort of 0.
This allows fast selection of NEXT tasks with no effort defined.
Column view with follow-mode active in the agenda is great for quickly
filling in the agenda estimated effort values for tasks. Just display
your Next tasks, then / 0 to select tasks with no effort and enter
column mode (C-c C-x C-c) and fill in your effort values with the
quick keys (0-9) for all of the tasks that have blanks in the effort
column.
Jurgen Defume asked for a way to display only logging information in
the agenda. This patch implements such a possibility. It works by
calling `org-agenda-log-mode' (bound to `l' in the agenda) with a
double prefix arg. This sets the variable `org-agenda-show-log' to a
special value `only' which is then interpreted by the agenda-creating
functions.
Org records (depending on setup) various information about progress
achieved with projects and tasks. It can record when an item is done
(when it is "closed"), it can record time spent working on these
entries (clocking), and it can record state changes.
In the daily/weekly agenda, turning on logbook mode with the `l' key
will lists the tasks closed or clocked on a day.
This patch implements showing recorded state changes in the agenda
logbook. By default, showing state changes is not turned on. But you
can configure the new variable `org-agenda-log-mode-items' to trigger
inclusion of state changes. An alternative way is to press `C-u l' in
the agenda, to temporarily force inclusion of all possible entries
(closed, clock, state) into the agenda display.
In passing, this patch renames the function `org-agenda-get-closed' to
the now more appropriate `org-agenda-get-progress'. The old name
continues to be available as an alias, but its use is deprecated.
So far, Org used either `fit-window-to-buffer' or
`shrink-window-if-larger-than-buffer' without any further checks when
displaying one of its many help and selection buffers. This can cause
problems if the user has set up Emacs to split windows horizontally
rather than vertically, because the window being shrunken then may be
side-by-side with another window, and shrinking the height of one will
also change the other.
With this patch, shrinking a window always goes through the new
function `org-fit-window-to-buffer' which only acts if the current
window spans the whole width of the frame.
Furthermore, this function also helps with compatibility, because it
falls back to `shrink-window-if-larger-than-buffer' if
`fit-window-to-buffer' does not exist, as is the case on older version
of Emacs and XEmacs.
When marking a repeated entry DONE in the daily or weekly agenda, that
task would previously still be shown as TODO, because the repeater
immediately restores the TODO state after moving the time stamp. This
is bad feedback.
This problem was hard to fix. Because the same line may be present in
other lines in the same weekly agenda, we cannot simply update all
lines related to this entry.
What we do now is this: Before the repeater does its work in shifting
the time stamp and resetting the TODO keyword, we take a snapshot of
the headline as it looks then. And then, when we update the agenda
view, we change only the line at the cursor instead of all lines
related to this entry. We also make sure that this is only so if the
cursor is in a daily/weekly agenda, on TODAY's date.
There still remain possible inconsistencies. For example, if you have
a daily repeating task in the weekly agenda, and you move the cursor a
few days into the future and mark it DONE there, the entry will
actually be marked DONE for today, but still show up in today's task
list as TODO. refreshing the agenda will fix the display in such an
unlikely case.
Thanks to Jack ??? for noticing and reporting this issue.
C-c C-c still works with the cursor in a headline,
but I wanted a special binding as the default, mainly
in order to be able to set tags in a remember buffer.