emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] text color + highlight


From: David Maus
Subject: Re: [Orgmode] text color + highlight
Date: Tue, 10 Aug 2010 23:39:19 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Christian Moe wrote:
>Hi, Eric,

>Thanks for trying this out -- I should have taken the trouble to write
>out sample code myself.

>> Just for completeness I'm adding an example of a color handler which can
>> be added to a users config to enable colorization of exported text to
>> html and latex.
>>
>> --8<---------------cut here---------------start------------->8---
>> (org-add-link-type
>>  "color" nil
>>  (lambda (path desc format)
>>    (cond
>>     ((eq format 'html)
>>      (format "<span style=\"color:%s;\">%s</span>" path desc))
>>     ((eq format 'latex)
>>      (format "{\\color{%s}%s}" path desc)))))
>> --8<---------------cut here---------------end--------------->8---
>>

>A drawback with using links for markup is that the user sees things that
>look like links, but do nothing when clicked, except give error messages.

It's not just a drawback but a more fundamental problem: This solution
abolishes the semantics of a fundamental entity, the link.  color:red
/means/ something completely different than info:elisp.

I'll need some time to read the proposal about this topic but my
out-of-the-guts impression is, that the distinction between semantics
and markup (or visualization) is not drawn as sharp as it is.  For Org
it's all about semantics: If we know what a special sequence of
characters means, we can provide appropriate actions.  One possible
action is to provide special colors etc. as a visual aid.

So maybe don't focus on how to /implement/ visualization but on the
general purpose or meaning of what is /visualized/ (!) by distinct
colors.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpSpglI6oN_j.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]