From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Egli Christian (KIRO 41)" Subject: RE: Behavior Change/Bug: Agenda sorting of deadline itemsv > 4.73 Date: Fri, 1 Feb 2008 09:28:22 +0100 Message-ID: <52D89C75FEE9444E8D9C016E3730098306CEB4@chsa1036.share.beluni.net> References: <20080131103218.GB21734@atlantic.linksys.moosehall><8616E01A-5786-49E5-BA14-C5968EA2FE4A@science.uva.nl><20080131120310.GD21734@atlantic.linksys.moosehall><803AD9DF-C436-4733-B83D-90DBB16ADC21@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKrGG-0003lp-Ru for emacs-orgmode@gnu.org; Fri, 01 Feb 2008 03:28:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKrGG-0003l1-1S for emacs-orgmode@gnu.org; Fri, 01 Feb 2008 03:28:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKrGF-0003kq-Ou for emacs-orgmode@gnu.org; Fri, 01 Feb 2008 03:28:35 -0500 Received: from mail-gw13.credit-suisse.com ([198.240.213.22]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JKrGF-0006ea-LW for emacs-orgmode@gnu.org; Fri, 01 Feb 2008 03:28:35 -0500 Content-class: urn:content-classes:message In-Reply-To: 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: emacs-orgmode@gnu.org Hi Eric > In both examples it is set to > ((agenda time-up category-keep priority-down) > Under 5.16a priorities > >> Thursday 31 January 2008 > 1100>> deadline-order-bug:In -730 d.: Jan One DEADLINE: <2006-01-31 Thu> > 1100>> deadline-order-bug:In -365 d.: Jan Two DEADLINE: <2007-01-31 Thu> > 1100>> deadline-order-bug:Deadline: Jan Three DEADLINE: <2008-01-31 Thu> > 1100>> deadline-order-bug:In -715 d.: Feb One DEADLINE: <2006-02-15 Thu> > 1100>> deadline-order-bug:In -350 d.: Feb Two DEADLINE: <2007-02-15 Thu> > 1009>> deadline-order-bug:In 15 d.: Feb Three DEADLINE: <2008-02-15 Thu> > 1009>> deadline-order-bug:In 366 d.: Jan Four DEADLINE: <2009-01-31 Thu> > 1006>> deadline-order-bug:In 381 d.: Feb Four DEADLINE: <2009-02-15 Thu> > Under 4.67c priorites are > >> Thursday 31 January 2008 > 1740>> deadline-order-bug:In -730 d.: Jan One DEADLINE: <2006-01-31 Thu> > 1725>> deadline-order-bug:In -715 d.: Feb One DEADLINE: <2006-02-15 Thu> > 1375>> deadline-order-bug:In -365 d.: Jan Two DEADLINE: <2007-01-31 Thu> > 1360>> deadline-order-bug:In -350 d.: Feb Two DEADLINE: <2007-02-15 Thu> > 1100>> deadline-order-bug:Deadline: Jan Three DEADLINE: <2008-01-31 Thu> > 995>> deadline-order-bug:In 15 d.: Feb Three DEADLINE: <2008-02-15 Thu> > 644>> deadline-order-bug:In 366 d.: Jan Four DEADLINE: <2009-01-31 Thu> > 629>> deadline-order-bug:In 381 d.: Feb Four DEADLINE: <2009-02-15 Thu> > Maybe someone else can duplicate this behavior with the org file that follows? Hm, the 4.67c behaviour seems a bit more sensible as it incorporates the number of days that a deadline is delayed into the priority calculation. Have a look at the function org-agenda-get-deadlines where the priority of a deadline is calculated. Specifically the following code: : (setq s (match-string 1) : pos (1- (match-beginning 1)) : d2 (org-time-string-to-absolute (match-string 1) d1) : diff (- d2 d1) : wdays (org-get-wdays s) : dfrac (/ (* 1.0 (- wdays diff)) wdays) : upcomingp (and todayp (> diff 0))) and=20 : 'priority (+ (if upcomingp (floor (* dfrac 10.)) 100) : (org-get-priority txt)) You might be able to tweak this to get the desired behaviour. Hope that helps Christian