From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: Code snippet for bolding or italicizing A/C priority strings Date: Wed, 10 Oct 2007 14:32:27 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ifak5-000572-PH for emacs-orgmode@gnu.org; Wed, 10 Oct 2007 08:32:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ifak2-00051X-FG for emacs-orgmode@gnu.org; Wed, 10 Oct 2007 08:32:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifak2-00051J-99 for emacs-orgmode@gnu.org; Wed, 10 Oct 2007 08:32:46 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ifak1-0004AQ-Nr for emacs-orgmode@gnu.org; Wed, 10 Oct 2007 08:32:46 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ifajq-0003n8-99 for emacs-orgmode@gnu.org; Wed, 10 Oct 2007 12:32:34 +0000 Received: from 212.34.176.74 ([212.34.176.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Oct 2007 12:32:34 +0000 Received: from rainer.stengele by 212.34.176.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Oct 2007 12:32:34 +0000 In-Reply-To: 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: emacs-orgmode@gnu.org John Wiegley schrieb: > John Wiegley writes: > >> This code snippet will modify your agenda buffer upon creation so that the >> string [#A] is bolded, and [#C] is italicized. It keeps whatever color it >> had, it's just now strong or weak based on priority. > > Actually, I'm finding I like having the whole title bolded or italicized, just > like Gnus does: > > (defun org-fontify-priorities () > (interactive) > (save-excursion > (let ((inhibit-read-only t)) > (goto-char (point-min)) > (while (re-search-forward "\\[#\\([A-C]\\)\\]" nil t) > (let ((priority (match-string 1))) > (cond ((string= priority "A") > (overlay-put (make-overlay (match-beginning 0) > ;;(match-end 0) > (line-end-position)) > 'face 'bold)) > ((string= priority "C") > (overlay-put (make-overlay (match-beginning 0) > ;;(match-end 0) > (line-end-position)) > 'face 'italic)))))))) > > (add-hook 'org-finalize-agenda-hook 'org-fontify-priorities) > > John > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > Excellent! I appreciate your function very much! It helps a lot to get a better overview in the agenda! rainer