From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Lohmar Subject: Re: [PATCH] Nicer fontification for org-todo-list Date: Thu, 06 Dec 2012 21:14:49 +0100 Message-ID: <87vccfx7ie.fsf@acer.localhost.com> References: <87hao1q3ts.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TghqW-000526-4E for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 15:15:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TghqQ-0006Kg-7i for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 15:15:00 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:56359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TghqP-0006KV-W1 for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 15:14:54 -0500 Received: by mail-bk0-f41.google.com with SMTP id jg9so3159831bkc.0 for ; Thu, 06 Dec 2012 12:14:52 -0800 (PST) In-Reply-To: <87hao1q3ts.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode@gnu.org On Tue, Dec 04 2012 15:39 (+0100), Bastien wrote: > Hi Ingo, > > sorry nobody had the time to test the patch and report. > > It looks good to me and does the right thing. > > Do you mind resending it using git? Don't forget to add a changelog > entry (with `C-x 4 a' in the modified places) and a TINYCHANGE cookie > at the end of the entry. > > Note that we cannot accept patches larger than 20 lines, so if you > want to contribute further, maybe you can consider signing the FSF > papers? > > See > http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt > > Thanks for your contribution/patience! > > -- > Bastien Hi Bastien, No worries, and thanks for taking the time. Below is the patch in git format, I hope the format is ok (incl changelog), otherwise please bear with me... Will send the mail regarding the FSF papers soon! Ingo >From 1ecc9832bcda75638dc29565f71516416e599e89 Mon Sep 17 00:00:00 2001 From: Ingo Lohmar Date: Thu, 6 Dec 2012 20:51:59 +0100 Subject: [PATCH] Propertize keywords in todo list header * org-agenda.el (org-todo-list): Propertize keywords with their proper faces in the header of a todo list agenda. TINYCHANGE --- lisp/org-agenda.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2c484b5..15321e1 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4509,6 +4509,17 @@ in `org-agenda-text-search-extra-files'. ;;; Agenda TODO list +(defun org-propertize-todo-keyword-list (keywords) + (concat + (if (or (equal keywords "ALL") (not keywords)) + (propertize "ALL" 'face 'warning) + (mapconcat + (lambda (kw) + (propertize kw 'face (org-get-todo-face kw))) + (org-split-string keywords "|") + "|")) + "\n")) + (defvar org-select-this-todo-keyword nil) (defvar org-last-arg nil) @@ -4569,9 +4580,7 @@ for a keyword. A numeric prefix directly selects the Nth keyword in (concat "ToDo: " (or org-select-this-todo-keyword "ALL")))) (org-agenda-mark-header-line (point-min)) - (setq pos (point)) - (insert (or org-select-this-todo-keyword "ALL") "\n") - (add-text-properties pos (1- (point)) (list 'face 'org-warning)) + (insert (org-propertize-todo-keyword-list org-select-this-todo-keyword)) (setq pos (point)) (unless org-agenda-multi (insert "Available with `N r': (0)[ALL]") -- 1.7.10.4