[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] patch for custom colored links in org-mode
From: |
John Kitchin |
Subject: |
Re: [O] patch for custom colored links in org-mode |
Date: |
Fri, 01 Jul 2016 13:20:29 -0400 |
User-agent: |
mu4e 0.9.16; emacs 25.1.50.1 |
+1 for all this.
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin <address@hidden> writes:
>
>> Indeed, I based this approach off a patch Rasmus posted some time ago for
>> colored blocks ;)
>>
>> It is also similar to some other approaches in org-mode, e.g.
>> the "org-%s-complete-link" functions.
>
> This is yet another obscure part of Org, IMO. I really think we need to
> normalize link customization, for an improved user experience.
>
>> Would you consider expanding org-add-link-type like this to set those in
>> the special variable?
>
> I don't like much `org-add-link-type' because, it inherently only
> operates on additional link types, so it is not sufficient to handle all
> customization needs. I'd rather have a single way to control link
> behaviour.
I agree, it doesn't make sense to use it for customization. OTOH, it
also adds the link type to org-link-types, rebuilds the regexp and the
org-link-protocols.
Do you think we would eliminate `org-link-types' and
`org-link-protocols' then? That would be fine with me.
I think we might still want an org-add-link-type function though, if
there are additional things that need to be done after adding to
`org-link-type-parameters', e.g. updating regexps. It might even be
feasible to keep backward compatibility for code that already uses this.
Presumably we would then eliminate the "org-%s-complete-link" functions?
There don't seem to be many (not including the auto-generated org-ref
related ones ;)
>
> I think we could rename `org-link-display-parameters' into
> `org-link-type-parameters' and control links from that location. More
> explicitly, the value for a given link type (string) could be a plist
> with the following properties
> - :follow
> - :export
> - :face
> - :display
> - :completion
> - :echo
>
> The value would contain every link type, including internal ones. Its
> value would probably be daunting at first (compared, e.g., with
> a boolean) but it would give full control over links.
I like it.
>
> WDYT?
>
>
> Regards,
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu