From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: [PATCH] Agenda: Simplify old fix of face for deadline warning 0 day Date: Thu, 04 Aug 2011 20:18:43 -0400 Message-ID: <87pqkkbti4.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp87j-00079e-Pn for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 20:18:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qp87i-00029D-LZ for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 20:18:47 -0400 Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:38689 helo=mho-02-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp87i-000296-IP for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 20:18:46 -0400 In-Reply-To: (Michael Brand's message of "Mon, 1 Aug 2011 10:57:13 +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: Michael Brand Cc: Org Mode Michael Brand writes: > Agenda: Simplify old fix of face for deadline warning 0 day > > * lisp/org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the > case of wdays being 0. Don't pass wdays to org-agenda-deadline-face, > like before the old fix. > (org-agenda-deadline-face): Revert to old state that was without > wdays. > > This allows a deadline warning period of "-0d" to work also with a > custom configuration like: > (setq org-agenda-deadline-faces > '((1.0001 . org-warning) ; due yesterday or before > (0.0 . org-upcoming-deadline))) ; due today or later > For org-agenda-deadline-faces left at default and all other settings > not exceeding 1.0, the face for a deadline warning of any length > remains untouched by this patch. > > references to history: > * commit of the old fix > - http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=d0d6325 > - git show d0d6325 > * mailing list old thread > - http://thread.gmane.org/gmane.emacs.orgmode/5753 > - http://lists.gnu.org/archive/html/emacs-orgmode/2008-02/msg00395.html This patch works okay for me with my default setting of ,---- | org-agenda-deadline-faces is a variable defined in `org-faces.el'. | Its value is | ((1.0 . org-warning) | (0.5 . org-upcoming-deadline) | (0.0 . default)) `---- Regards, Bernt