* lisp/org-agenda.el (org-agenda-get-timestamps): No errors
while getting TODO state.
(org-agenda-highlight-todo): No error when no keyword has
been matched.
Eric Arneson writes:
> I've discovered a bug in `org-agenda-get-timestamps' wherein an active
> timestamp before the first headline causes it to fail. I realize that
> this is probably an error in my use of active timestamps, but there was
> no really handy error message and this bugged me for weeks.
>
> I'm not familiar enough with org-mode to know what the correct behavior
> should be here (it'd be nice to get an error message saying "Don't use
> active timestamps that way!"), but here's an example .org file that will
> trigger the bug:
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN: clocktable :maxlevel 3 :scope today
> Clock summary at [2010-06-20 Sun 13:09]
>
> | L | Headline | Time |
> |---+---------------------------------------+--------|
> | | *Total time* | *0:13* |
> |---+---------------------------------------+--------|
> | 1 | Track down funky bug <2010-06-20 Sun> | 0:13 |
> #+END:
>
> * Track down funky bug <2010-06-20 Sun>
> :LOGBOOK:
> CLOCK: [2010-06-20 Sun 12:43]
> CLOCK: [2010-06-20 Sun 12:30]--[2010-06-20 Sun 12:43] => 0:13
> :END:
> --8<---------------cut here---------------end--------------->8---
>
> I hope this can help somebody else track down the right place to fix
> this bug.
Bernt Hansen writes:
> I was talking to Jeff Stern about tags todo matching offlist and we
> think the documentation for tags-todo matching can probably be improved.
>
> The description of C-c a M at
> http://orgmode.org/manual/Matching-tags-and-properties.html
> states
>
> C-c a M
>
> Like C-c a m, but only select headlines that are also TODO items and
> force checking subitems (see variable
> org-tags-match-list-sublevels). To exclude scheduled/deadline items,
> see the variable org-agenda-tags-todo-honor-ignore-options. Matching
> specific TODO keywords together with a tags match is also possible,
> see Tag searches.
>
> When I read this I think TODO items is any todo keyword but this isn't
> the case. It is only non-done TODO state keywords. This makes
> tags-todo matching not work for finding tasks to archive (normally
> DONE | CANCELLED keywords in my setup)
>
> Should we explicitly state that 'headlines that are also TODO items'
> does not match DONE state keywords? Or alternatively should TODO items
> and DONE items be separate (and explicitly defined) in the documentation
> -- like org-todo-keywords and org-done-keywords?
>
> I still think 'TODO keyword' matches any todo keyword defined in
> org-todo-keywords and maybe I need to be re-educated :)
Bernt is right, and this patch tries to clarify the issue.
* lisp/org-agenda.el (org-agenda-action): Make `c' key call org-capture.
* lisp/org-capture.el: New file.
* lisp/org-compat.el (org-get-x-clipboard): Function moved here from
remember.el.
* lisp/org-mks.el: New file
* lisp/org.el (org-set-regexps-and-options): Allow statistic cookies as
part of complex headlines.
(org-find-olp): New argument THIS-BUFFER. When set, assume that the
OLP does not contain a file name.
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is. If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date. This makes it
much more obvious when you missed a repeating task after the repeater.
Thanks to Bernt Hansen for this patch.
Hello, Org mode hackers,
This patch defines a variable `org-agenda-persistent-filters'.
When it is set, filters persist from one agenda view to the next.
I've found this convenient when using tags for contexts like @home,
@net, etc., some of which commonly remain applicable for a while.
Thanks,
Thomas
From 052ef9205845c78cb24d6fea8f89484bbe12a528 Mon Sep 17 00:00:00 2001
From: Thomas Morgan <tlm@ziiuu.com>
Date: Fri, 23 Apr 2010 11:48:03 +0200
Subject: [PATCH] New option `org-agenda-persistent-filters'.
When set, keep filters from one agenda view to the next.
Patch by Matt Lundin
Matt writes:
> The missing piece of the puzzle is integration with "diary" and
> "cal-tex" functions via the org-diary sexp. I have found org-diary to be
> excruciatingly slow when called for anything more than a couple of days.
> I have the following line in my diary file:
>
> &%%(org-diary :timestamp :sexp)
>
> If I try to view 20 or so upcoming days in the diary by typing C-u 20 d
> on a date in the calendar, it can take upwards of 30 seconds to generate
> the diary display. This is of little consequence, since I can, after
> all, simply use the custom agenda command. But I often want to print out
> a nice LaTeX calendar of my appointments with cal-tex-cursor-month. And
> that takes upwards of 50 seconds (see attached elp-results file).
>
> Judging from the elp-results, the culprit seems to be
> org-prepare-agenda-buffers (46 seconds), which is called 31 times (once
> for each day). It seems to me that since org-diary is being called 31
> times in quick succession by the same function (diary-sexp-entry), one
> should only need to call org-prepare-agenda-buffers once.
>
> The only solution I could see to this problem was to add a test to see
> if org-diary had been called less than 1 second ago. Thus, I added the
> variable org-diary-last-run-time and a conditional in org-diary that
> only runs org-prepare-agenda-buffers if org-diary-last-run-time is less
> than 1 second in the past.
>
> With the patch, it now takes appr. 5 seconds to generate the LaTeX
> calendar with cal-tex and org-prepare-agenda-buffers is called only
> once.
Allow C-2 C-c C-w to work in the agenda.
Update agenda after refiling
This rebuilds the agenda buffer after the refile operation completes.
It was removing the to-be-refiled task before prompting for the location
which felt a little strange. While on the prompt you can't see
the task you are refiling anymore since it was just removed from the
agenda list and if you aborted from the refile operation
with C-g then the task to be refiled has already been removed.
org-agenda.el (org-agenda-include-deadlines): Added new
customization variable to determine whether unscheduled tasks
should appear in the agenda solely because of their deadline.
Default to true, which was the previous behavior (it just wasn't
configurable).
(org-agenda-mode-map, org-agenda-view-mode-dispatch): Bind ! in
the agenda to show/hide deadline tasks.
(org-agenda-menu): Added menu option for show/hide deadlines.
(org-agenda-list): Make the agenda list sensitive to the value of
`org-agenda-include-deadlines'.
(org-agenda-toggle-deadlines): New function to toggle the value of
`org-agenda-include-deadlines' and repaint the modeline
indicators.
(org-agenda-set-mode-name): Show "Deadlines" in the agenda
modeline if deadline tasks are being displayed.
Patch by Matt Lundin
Matt writes:
> Below is a patch I've been using to speed up the construction of
> agenda views limited to certain types of entries (e.g., timestamps and
> sexps). Previously, I had constructed "calendar" views consisting
> only of timestamps and sexps by using the variable
> org-agenda-skip-function to exclude scheduled items and deadlines from
> the agenda. This, however, proved somewhat slow (3-4 seconds for
> weekly calendars, 10-12 seconds for monthly calendars). The patch
> below cuts the times to 1 and 3 seconds respectively. I believe it
> provides an efficient alternative to the skip function by allowing the
> user to tweak the arguments passed to org-agenda-get-day-entries.