From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] agenda filter: Treat no effort value the same as 0 Date: Tue, 11 Nov 2008 06:57:47 +0100 Message-ID: <10317956-AC6E-4C8E-9A8E-D48645E3BE21@uva.nl> References: <871vxjp98b.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzmG9-0000tj-Qx for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 00:57:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzmG8-0000t4-9t for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 00:57:53 -0500 Received: from [199.232.76.173] (port=38085 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzmG7-0000sz-Vp for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 00:57:52 -0500 Received: from nf-out-0910.google.com ([64.233.182.188]:54449) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzmG7-0003Or-C8 for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 00:57:51 -0500 Received: by nf-out-0910.google.com with SMTP id c7so1578963nfi.26 for ; Mon, 10 Nov 2008 21:57:50 -0800 (PST) In-Reply-To: <871vxjp98b.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Nov 10, 2008, at 10:22 PM, Bernt Hansen wrote: > 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: This commit is available at git://git.norang.ca/org-mode on > the > branch 'agenda-no-effort-is-zero' > > -Bernt > > lisp/org-agenda.el | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index a2e1415..371e7d9 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -4305,10 +4305,10 @@ E looks line \"+<2:25\"." > > (defun org-agenda-compare-effort (op value) > "Compare the effort of the current line with VALUE, using OP. > -If the line does not have an effort defined, return nil." > +If the line does not have an effort defined, return zero (0)." > (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, assume 0 > (funcall op eff value)))) > > (defun org-agenda-filter-apply (filter) > -- > 1.6.0.4.608.ga9645 > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode