From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH 2/2] org-agenda: add org-agenda-day-face-function Date: Fri, 12 Nov 2010 09:30:13 -0600 Message-ID: References: <1289236987-21552-1-git-send-email-julien@danjou.info> <1289236987-21552-2-git-send-email-julien@danjou.info> 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=35239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGva5-00009x-Hx for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:30:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGva4-00078q-D7 for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:30:25 -0500 Received: from mail-yw0-f41.google.com ([209.85.213.41]:50903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGva4-00078j-81 for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:30:24 -0500 Received: by ywi6 with SMTP id 6so33302ywi.0 for ; Fri, 12 Nov 2010 07:30:23 -0800 (PST) In-Reply-To: <1289236987-21552-2-git-send-email-julien@danjou.info> 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: Julien Danjou Cc: emacs-orgmode@gnu.org Hi Julien, to make sure I don't make a mistake here, could you please send a new patch which contains all the changes in a single patch. Sorry about this. - Carsten On Nov 8, 2010, at 11:23 AM, Julien Danjou wrote: > * lisp/org-agenda.el (org-agenda-day-face-function): New variable. > (org-agenda-get-day-face): Use org-agenda-day-face-function. > > Signed-off-by: Julien Danjou > --- > lisp/org-agenda.el | 20 +++++++++++++++----- > 1 files changed, 15 insertions(+), 5 deletions(-) > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index 98371e6..ffd6c90 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -1433,6 +1433,14 @@ determines if it is a foreground or a > background color." > (string :tag "Color") > (sexp :tag "Face")))))) > > +(defcustom org-agenda-day-face-function nil > + "Function called to determine what face should be used to display > a day. > +The only argument passed to that function is the day. It should > +returns a face, or nil if does not want to specify a face and let > +the normal rules apply." > + :group 'org-agenda-line-format > + :type 'function) > + > (defcustom org-agenda-category-icon-alist nil > "Alist of category icon to be displayed in agenda views. > > @@ -3108,11 +3116,13 @@ no longer in use." > > (defun org-agenda-get-day-face (date) > "Return the face DATE should be displayed with." > - (cond ((org-agenda-todayp date) > - 'org-agenda-date-today) > - ((member (calendar-day-of-week date) org-agenda-weekend-days) > - 'org-agenda-date-weekend) > - (t 'org-agenda-date))) > + (or (and (functionp org-agenda-day-face-function) > + (funcall org-agenda-day-face-function date)) > + (cond ((org-agenda-todayp date) > + 'org-agenda-date-today) > + ((member (calendar-day-of-week date) org-agenda-weekend-days) > + 'org-agenda-date-weekend) > + (t 'org-agenda-date)))) > > ;;; Agenda timeline > > -- > 1.7.2.3 > > > _______________________________________________ > 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