From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch: org-agenda-skip-deadline-prewarning-if-scheduled prior to scheduled date Date: Thu, 25 Oct 2012 15:36:31 +0200 Message-ID: <878vaullls.fsf@gmail.com> References: <87wqypedlk.fsf@pc130-c703.uibk.ac.at> <87zk3lmelw.fsf@gmail.com> <87y5j5cgtv.fsf@pc130-c703.uibk.ac.at> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNfo-0008N2-EN for emacs-orgmode@gnu.org; Thu, 25 Oct 2012 09:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRNfi-0004WQ-JX for emacs-orgmode@gnu.org; Thu, 25 Oct 2012 09:40:36 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:64444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNfh-0004Vj-EE for emacs-orgmode@gnu.org; Thu, 25 Oct 2012 09:40:30 -0400 Received: by mail-wg0-f49.google.com with SMTP id gg4so932224wgb.30 for ; Thu, 25 Oct 2012 06:40:26 -0700 (PDT) In-Reply-To: <87y5j5cgtv.fsf@pc130-c703.uibk.ac.at> (Justus-dev@piater.name's message of "Wed, 17 Oct 2012 16:29:32 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Justus-dev@Piater.name Cc: emacs-orgmode@gnu.org Hello, Justus-dev@Piater.name writes: > But first one more request for comments that I forgot to include in my > original message: > > Computing the difference between two dates in the presence of repeating > dates is a subtle affair. Here, in computing the difference between > deadline (d2) and scheduled date (ds), > > (min (- d2 (org-time-string-to-absolute > ds d1 'past show-all (current-buffer) pos)) > org-deadline-warning-days) > > I simply followed the time-to-deadline computation of the current TODO > item from a few lines above: > > (setq ... > d2 (org-time-string-to-absolute > (match-string 1) d1 'past show-all > (current-buffer) pos) > diff (- d2 d1)) > > I sort-of see what this org-time-string-to-absolute call does, but I do > not fully understand its implications. It would be good for someone who > does to verify that my code indeed rightly follows the same logic. The code looks good to me. If there is no objection, I think we can apply the patch. Regards, -- Nicolas Goaziou