Luke Crook wrote:
> Is it possible to specify estimated effort in something other
> than hours (0.5, or 0:30)?
> For example 1w, 1m, 2d etc?
Here's a cleaned up patch that allows user-specified modifiers
for effort strings. The new variable `org-effort-durations'
lists modifiers, and their mapping to minutes (words, as well as
single-letter modifiers, are supported). The default value is:
(("h" . 60)
("d" . 480) ; 8 hours
("w" . 2400) ; five days
("m" . 9600) ; 4 weeks
("y" . 96000)) ; 40 weeks
But you can change this.
Old effort strings (HH:MM) are still interpreted correctly. See
the docstrings of `org-effort-durations' and
`org-duration-string-to-minutes' for more details.
>From a0e24b14755eb4087d9c47bb4eea11eb9151efcf Mon Sep 17 00:00:00 2001
From: Lawrence Mitchell <wence@gmx.li>
Date: Fri, 18 Feb 2011 11:01:46 +0000
Subject: [PATCH] Allow human-readable effort durations
To: emacs-orgmode@gnu.org
* lisp/org.el (org-effort-durations): New variable.
* lisp/org.el (org-duration-string-to-minutes): New function.
* lisp/org-agenda.el (org-agenda-filter-effort-form)
(org-format-agenda-item): Use it.
* lisp/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-modify-effort-estimate, org-clock-get-clock-string): Use it.
Specifying large effort durations in hours and minutes is difficult.
Is 130:25 more than two weeks effort? More than three? This patch
allows specification of an effort duration as a friendly string. For
example 2w 5d is two weeks and five days of effort. Existing H:MM
entries will still be recognised correctly.
* org-agenda.el (org-agenda): Set the 'last-args property to
nil when calling `org-agenda'. Don't kill the local variable
`org-agenda-current-span'.
(org-run-agenda-series): Use the new property 'last-args.
(org-agenda-change-time-span): Use the dynamically set
`org-agenda-overriding-arguments' variable when non-nil.
Thanks to Matt Lundin and Michael Brand for reporting this.
* org-agenda.el (org-agenda-date-later)
(org-agenda-date-earlier): Enhance docstrings.
(org-agenda-bulk-mark-regexp): Only match against headlines.
Send a message when no entry is marked.
(org-agenda-bulk-action): Fix bug about scattering deadlines.
Send an error when trying to scatter outside an agenda or a
timeline view. Silently fail when trying to scatter sexp
entries.
* org-agenda.el (org-get-entries-from-diary): Put multiline
diary entries on a single line when lines don't start with a
diary time.
This was requested by Suvayu Ali.
Locally kill org-agenda-current-span as a variable, otherwise
the current value of org-agenda-current-span is taken as the
default value when redoing the buffer or calling org-agenda
with a different view.
This might be a temporary fix, as Julien is looking for a
more general solution. See his message here:
http://article.gmane.org/gmane.emacs.orgmode/37359
* lisp/org-agenda.el (org-agenda-filter-by-tag): Refresh agenda when
updating the filter while the clock report is following the filter.
When the clock table in the agenda has been set up to respect the
current agenda tags filter, modifying the filter will now
automatically rebuild the agenda to make sure that also the clock
report is updated along with it. Updating the entire agenda is not
strictly necessary - updating the table would be enough. However,
right now we do not really have a function that will update only the
clock table, as inserting the table is currently part of building the
agenda itself. Maybe someone can optimize this in the future.
This feature was requested by Sebastien Vauban.
On Sat, Feb 05 2011, Matt Lundin wrote:
> This results in only a day view because org-agenda-current-span is still
> 'day.
Here's a proposal fix.
I could have setq org-agenda-current-span to nil as a work around, but
it seems more logical to just kill all the local variables. That is, a
custom agenda view would not keep any of the local variable of the
previous agenda, which seems logical to me.
>From b48fc7c395dffea60df20c23b26e362ac0354b01 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 7 Feb 2011 12:36:42 +0100
Subject: [PATCH] org-agenda: kill local variables in agenda view
* org-agenda.el (org-agenda): Kill all local variables. This
assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-agenda.el (org-agenda-get-day-entries): Compare DATE with
modified today.
When a user sets org-extend-today-until, the agenda TODO list would
come up empty when requested in the extension period between midnight
and org-extend-today-until. This problem is new, it was caused by a
patch that introduced the function org-today and used it also
in org-todo-list.
The reason why this caused a problem is a bit difficult. The agenda
need a date to be defined, and getting todo entries is subject to the
current date being today. This is a leftover condition from the times
when the TODO list was often part of the daily agenda listing, and the
test is there to avoid that the TODO list comes also up when looking
at the agenda for tomorrow. Much of this is irrelevant now, because
people use either block agendas, or separate views - but the old
functionality is retained for backward compatibility.
This patch fixes the problem by making `org-agenda-get-day-entries'
check for the date computed by `org-today'.
* org-agenda.el (org-agenda-bulk-mark-regexp): New command.
(org-agenda-menu): Add the new command to the menu.
(org-agenda-mode-map): Add % as the keybinding for the new
command.
* org-agenda.el (org-agenda-repeating-timestamp-show-all):
Allow to use a list of TODO keywords as the value of this
variable. The agenda will show repeating stamps for entries
matching these TODO keywords.
(org-agenda-get-timestamps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Allow the use of a list of
keywords in `org-agenda-repeating-timestamp-show-all'.
---
This was suggested by Jeff Horn and supported by Detlef Steuer.
On Mon, Jan 17 2011, Carsten Dominik wrote:
> have you been following this thread? I think this has to do with your
> rewrite of the dagenda span stuff. Maybe you can find out better and
> faster that I why this goes wrong? Please read the entire thread.
I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.
Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)
>From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump
* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.
Signed-off-by: Julien Danjou <julien@danjou.info>
* org-agenda.el (org-agenda-get-progress): Fix regexp for statep: it
must has \\ at the end of the line. This avoid matching the following
heading when there's no newline between the logged state and the next
heading.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-agenda.el: (org-agenda-todo-ignore-deadlines): New option.
(org-agenda-todo-ignore-scheduled): New option.
(org-agenda-todo-ignore-timestamp): New option.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): Allow user
to specify custom distance to ignore (future or past).
(org-agenda-todo-custom-ignore-p): New function.
This patch gives users greater control over which past or future items
they would like to ignore in the global todo list. By setting
org-agenda-todo-ignore-scheduled to 7, for instance, a user can ignore
all items scheduled 7 or more days in the future. Similarly, by
setting org-agenda-todo-ignore-scheduled to -1, a user can ignore all
items that are truly in the past (unlike the 'past setting, which
ignores items scheduled today). Thanks to Paul Sexton for the idea for
this new functionality.
* org-agenda.el (org-agenda-get-blocks): Fix time of start/end
of events with range. This display things like:
<2011-01-22 Sat 14:00>--<2011-01-23 Sun 20:00>
correctly, with the event starting at 14:00 and ending at 20:00.
Signed-off-by: Julien Danjou <julien@danjou.info>
On Mon, Jan 17 2011, Bernt Hansen wrote:
>
> Thanks for this patch. I think this fixes the issue I was having with
> 'j' in the agenda switching from week-view back to single-day view when
> org-agenda-ndays is set to 1.
>
> There is still a (new?) problem with jumping to today.
>
> Set the following variable
>
> (setq org-agenda-start-on-weekday 6)
>
> | Key Sequence | Notes |
> |--------------+------------------------------------------------|
> | C-c a a | Display weekly agenda |
> | f | Go forward a week |
> | d | Display day agenda |
> | . | Go to to day - but it goes to Saturday instead |
>
> This should go to today and not the first day of the week.
Attached is a fix for that.
>From f566a5612560f997f4760144ca850dda5c06bc5e Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 18:09:30 +0100
Subject: [PATCH] Fix org-agenda-goto-today not respecting the current span.
* org-agenda.el (org-agenda-goto-today): Respect current span.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-agenda.el (org-agenda-skip-function-global): New option.
(org-agenda-skip-eval): New function.
(org-agenda-skip): Use `org-agenda-skip-eval' and also check for the
global skipping condition.
This was a request by John Wiegley
* lisp/org-agenda.el (org-agenda-goto): Display invisible entry text
* lisp/org-agenda.el (org-agenda-switch-to): Display invisible entry text
Visiting clock lines with RET or TAB in the agenda can put point on a
folded clock drawer. This means you are editing invisible/hidden text
inside the task entry. Now when moving to invisible regions show the
entry so point is always visible.