From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: adding more color to agenda events Date: Sat, 3 Mar 2007 16:33:09 +0100 Message-ID: <64eae0edb78d2dff66fe09af1204e540@science.uva.nl> References: <286a22d00313775b9b71f6b0e93d4f0b@science.uva.nl> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNWES-0006Nq-3W for emacs-orgmode@gnu.org; Sat, 03 Mar 2007 10:33:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNWEQ-0006Ne-Qk for emacs-orgmode@gnu.org; Sat, 03 Mar 2007 10:33:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNWEQ-0006Nb-J3 for emacs-orgmode@gnu.org; Sat, 03 Mar 2007 10:33:10 -0500 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HNWEQ-0002MC-81 for emacs-orgmode@gnu.org; Sat, 03 Mar 2007 10:33:10 -0500 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: Scott Jaderholm Cc: emacs-orgmode@gnu.org Hi Scott, On Mar 1, 2007, at 18:43, Scott Jaderholm wrote: > Thanks Carsten! > > Do you know how to select the whole line instead of just the word? > Also, do you know where I can find more information about the syntax > to use in setting colors in the '(face ) area? > > Is there an easy way to not interfere with the other highlighting > that's going to happen? I'd like to highlight stuff in work.org with a > different color, say orange, but I think I'd like TODO to stay red and > Scheduled to stay green but change rest of headline color and the > work: column. If there's a way to do this easily I'd also like to use > it when defining special highlights for tags. > > Thanks again, > Scott Well, first you need to lear about regular expressions. For example to match a line containing the word birthday you would do "^.*\\.* To change only part of a line, leave the rest, you can use groups. For example, to change everyting in a line except the word TODO you would match it like "\\(^.*\\)\\\\(.*\\)" and then use `add-text-properties' twice, first to add the face property from (match-beginning 1) to (match-end 1), and then from (match-beginning 2) to (match-end 2). If you want to change the faces used by Org-mode in normal .org files, try M-x customize-group RET org-faces RET there you can change all the standard faces used. If you want to add new stuff to fontification in org-mode, take a look at the function `font-lock-add-keywords'. There are quite a few faces already defined in Emacs that you can use, or you can define your own. Well, you are entering the world of Emacs hacking here, and the only way you will get further is by learning about text properties, regular expressons etc in the Emacs manual and in the Emacs lisp manual. - Carsten