From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: text color + highlight Date: Tue, 10 Aug 2010 17:47:24 -0600 Message-ID: <87tyn2qbcj.fsf@gmail.com> References: <87pqxw5cb1.fsf@gnu.org> <87mxszcsuv.fsf@gmail.com> <87d3tvru38.fsf@gmail.com> <87iq3kkef1.fsf@gmail.com> <4C60EE48.6030106@christianmoe.com> <532CED92-88AD-46F6-BC67-9D0DEDAA6D71@gmail.com> <4C611C24.2030601@christianmoe.com> <87pqxq4icv.fsf@gmail.com> <4C619CB5.70409@christianmoe.com> <877hjyw3js.wl%dmaus@ictsoc.de> <4C61DA71.5020402@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=54035 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiyXa-0001Ao-KQ for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:47:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiyXY-0002wJ-UX for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:47:30 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:43719) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiyXY-0002w6-Re for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:47:28 -0400 Received: by iwn10 with SMTP id 10so5717252iwn.0 for ; Tue, 10 Aug 2010 16:47:27 -0700 (PDT) In-Reply-To: <4C61DA71.5020402@christianmoe.com> (Christian Moe's message of "Wed, 11 Aug 2010 01:02:09 +0200") 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: mail@christianmoe.com Cc: emacs-orgmode@gnu.org Christian Moe writes: [...] > > Admittedly, though, all the currently defined link types mean "do > something when clicked", which a =color:red= link does not. > well this may be trivial, but at least it's an action --8<---------------cut here---------------start------------->8--- (org-add-link-type "color" (lambda (path) (message (concat "color " (progn (add-text-properties 0 (length path) (list 'face `((t (:foreground ,path)))) path) path)))) (lambda (path desc format) (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "{\\color{%s}%s}" path desc))))) --8<---------------cut here---------------end--------------->8--- Best -- Eric > > Christian