emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] patch for custom colored links in org-mode


From: Thomas S. Dye
Subject: Re: [O] patch for custom colored links in org-mode
Date: Tue, 28 Jun 2016 08:34:06 -1000
User-agent: mu4e 0.9.17; emacs 24.5.1

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin <address@hidden> writes:
>
>> I tried this aproach to enable custom colored links in org-mode if an
>> org-link-type face is defined. If no face is applied, then it just gets
>> the default org-link face
>>
>> For example this will make all doi links red.
>>
>> (defface org-link-doi
>>   `((t (:inherit org-link
>>                  :foreground "red")))
>>   "Color for doi links.")
>>
>> It seems to work pretty well for me. What do you think about making this
>> a feature in org-mode?
>
> This sounds like a good idea. Thank you for submitting it.
>
> However, I'm not convinced by the UI, i.e., creating a face specifically
> named to trigger the feature. As a user, it doesn't seem very natural to
> me.
>
> At first I thought it was better to extend `org-add-link-type' with
> a FACE definition, but we wouldn't have caught default link types.
>
> So, maybe it is more reasonable to create a new variable, e.g.,
> `org-link-display-parameters', which would hold an alist between link
> types and property lists (or something else), e.g.,
>
>   ("doi" :face my-special-face :display full)
>   ("special" :display path)
>
> Note that :display is a way to include your other idea about link
> visibility. Default value for :face and :display would be, respectively,
> `org-link' and `description'.
>
> Of course, we can also create two variables, one for the face, the other
> for the visibility.

Great idea.  Thanks to John and Nicolas for bringing it up.

A single variable seems sufficient to me and easier to configure.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

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