From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks Date: Thu, 1 Jul 2010 15:00:30 +0200 Message-ID: References: <36E79B10-2D5D-434D-8C81-22E1FA8BDE4E@gmail.com> <1277242816-29777-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=57458 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUJNe-0000K3-Pw for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:00:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUJNc-0001fP-Of for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:00:38 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44217) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUJNc-0001fF-I2 for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:00:36 -0400 Received: by wyb39 with SMTP id 39so1511786wyb.0 for ; Thu, 01 Jul 2010 06:00:35 -0700 (PDT) In-Reply-To: <1277242816-29777-1-git-send-email-bernt@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. Please note that I had to change the commit message so that the second paragraph can be used as a ChangeLog entry with an ultra-short description. Also, sendon etc lines are not indented, unlike an org-mode list entry. The third paragraph is your original description, not indented. Thanks for this fix! - Carsten On Jun 22, 2010, at 11:40 PM, Bernt Hansen wrote: > * lisp/org.el (org-time-string-to-absolute): > > Ignore the cyclic repeater when displaying items on today's agenda > date. 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. > --- > Here's a new version of this patch which I think addresses Matt's > issue and it's simpler > which is always a bonus. > > The patch is available at git://git.norang.ca/org-mode.git fix- > agenda-late-tasks > > -Bernt > > > lisp/org.el | 21 +++++++++++---------- > 1 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 2628152..4ebf31d 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -14700,16 +14700,17 @@ If there is a specifyer for a cyclic time > stamp, get the closest date to > DAYNR. > PREFER and SHOW-ALL are passed through to `org-closest-date'. > the variable date is bound by the calendar when this is called." > - (cond > - ((and daynr (string-match "\\`%%\\((.*)\\)" s)) > - (if (org-diary-sexp-entry (match-string 1 s) "" date) > - daynr > - (+ daynr 1000))) > - ((and daynr (string-match "\\+[0-9]+[dwmy]" s)) > - (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) > daynr > - (time-to-days (current-time))) (match-string 0 s) > - prefer show-all)) > - (t (time-to-days (apply 'encode-time (org-parse-time-string > s)))))) > + (let ((today (calendar-absolute-from-gregorian (calendar-current- > date)))) > + (cond > + ((and daynr (string-match "\\`%%\\((.*)\\)" s)) > + (if (org-diary-sexp-entry (match-string 1 s) "" date) > + daynr > + (+ daynr 1000))) > + ((and daynr (not (eq daynr today)) (string-match "\\+[0-9]+ > [dwmy]" s)) > + (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) > daynr > + (time-to-days (current-time))) (match-string 0 s) > + prefer show-all)) > + (t (time-to-days (apply 'encode-time (org-parse-time-string > s))))))) > > (defun org-days-to-iso-week (days) > "Return the iso week number." > -- > 1.7.1.359.gd0b8d > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten