Browse Source

Treat no effort defined as 0 minutes.

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.
Carsten Dominik 16 years ago
parent
commit
dc43885102
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-agenda.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-agenda.el (org-agenda-compare-effort): Treat no effort
+	defined as 0.
+
 	* org-exp.el (org-export-language-setup): Add Catalan and
 	Esperanto language entries.
 

+ 1 - 1
lisp/org-agenda.el

@@ -4308,7 +4308,7 @@ E looks line \"+<2:25\"."
 If the line does not have an effort defined, return nil."
   (let ((eff (get-text-property (point) 'effort-minutes)))
     (if (not eff)
-	nil ; we don't have an effort defined
+	0 ; we don't have an effort defined, treat as 0
       (funcall op eff value))))
 
 (defun org-agenda-filter-apply (filter)