From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: org text color highlights fails Date: Thu, 04 Nov 2010 16:29:06 +0100 Message-ID: <4CD2D142.6010809@christianmoe.com> References: Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=44135 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE1ig-0001aA-4q for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:27:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE1iY-0001aw-I7 for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:27:16 -0400 Received: from mars.hitrost.net ([91.185.193.39]:44165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE1iY-0001aZ-BR for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:27:10 -0400 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: Marvin Doyley Cc: emacs-orgmode@gnu.org Hi, You are not doing anything wrong. The below solution only changes color in exported text (HTML, Latex). It doesn't put different faces on different link types in the Org buffer. So it's not a great help in editing. Yours, Christian Moe On 11/4/10 4:13 PM, Marvin Doyley wrote: > Hi there, > > There have been some useful discussions on changing text color in org > mode, a very useful feature when editing manuscripts. > Anyway, I tried the following function without any success. No change > in color, it just behave like a normal link (i.e, underlined). Could > someone shed some light on what I am doing wrong ? > > Cheers, > > M > > ;; org-mode color > (org-add-link-type > "color" nil > (lambda (path desc format)p > (cond > ((eq format'html) > (format"%s" path desc)) > > ((eq format'latex) > (format"{\\color{%s}%s}" path desc))))) > ;; org-mode highlight > (org-add-link-type > "hl" nil > (lambda (path desc format) > (cond > ((eq format'html) > > (format"%s" path desc)) > ((eq format'latex) > (format"\\colorbox{%s}{%s}" path desc))))) ;; require \usepackage{color} > > > Examples: > [[color:blue][test this out]] > [[hl:yellow][highlighted text]] > > > > > _______________________________________________ > 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 -- Christian Moe E-mail: mail@christianmoe.com Website: http://christianmoe.com