From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: Re: [PATCH 2/2] org-agenda: add org-agenda-day-face-function Date: Fri, 12 Nov 2010 16:50:14 +0100 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=54065 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGvtK-0000UV-Nl for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:50:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGvtJ-0002o4-Bo for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:50:18 -0500 Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:44369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGvtI-0002mV-L8 for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 10:50:17 -0500 In-Reply-To: (Carsten Dominik's message of "Fri, 12 Nov 2010 09:43:03 -0600") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org On Fri, Nov 12 2010, Carsten Dominik wrote: > Applied, thanks. > > I did not test it myself (have grown to trust Julien...), so if someone c= an > put this to a test, that would be nice. Thanks Carsten. If people wants to try it, here's an example of what I'm using to mark days as holidays using the weekend face. The function tests the category of all entries from all my Org files, and if the category is "Holidays" or "Vacation", I return the face used for weekend days. With that I quickly see I can stay at home and hack on org-mode. :-) (setq org-agenda-day-face-function (defun jd:org-agenda-day-face-holidays-function (date) "Compute DATE face for holidays." (unless (org-agenda-todayp date) (dolist (file (org-agenda-files nil 'ifmode)) (let ((face (dolist (entry (org-agenda-get-day-entries file date)) (let ((category (with-temp-buffer (insert entry) (org-get-category (point-min))))) (when (or (string=3D "Holidays" category) (string=3D "Vacation" category)) (return 'org-agenda-date-weekend)))))) (when face (return face))))))) --=20 Julien Danjou // =E1=90=B0 http://julien.danjou.info