Nicolas Goaziou writes:
> Hello,
>
> Rasmus writes:
>
>> Maybe a defcustom consisting of an alist of anonymous faces:
>>
>> '((R ((:background "red")))
>> (emacs-lisp ((:background "blue"
>
> Sounds good, even if a string as the key might be better (languages are
> stored as strings in the
Nicolas Goaziou writes:
> John Kitchin writes:
>
>> 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.
>
> It is possible to rebuild regexps upon modifying a defcustom.
Do you mean
Hello,
John Kitchin writes:
> Would it make sense to use a defstruct for the link?
I thought about that. Unfortunately, defstructs are not customize
friendly. If we are going to give direct access to
`org-link-parameters', i.e., make it a defcustom, this is not an option.
> Then we get getters
>
> WDYT?
>
>> Presumably we would then eliminate the "org-%s-complete-link"
>> functions?
>
> Indeed.
>
> I think it is possible to proceed in four steps.
>
> 1. First, we create the variable, with appropriate getter, setter and
>default values. At this point it is sufficient to
>support :
If there is no urgency I will take a shot at it next week. I will look through
the code and come up with a detailed plan that expands on your 4 steps below
and be in touch about it. Thanks in advance for your patience 😉.
On July 1, 2016, at 7:20 PM, Nicolas Goaziou wrote:
John Kitchin writes:
Hello,
Rasmus writes:
> Maybe a defcustom consisting of an alist of anonymous faces:
>
> '((R ((:background "red")))
> (emacs-lisp ((:background "blue"
Sounds good, even if a string as the key might be better (languages are
stored as strings in the parse tree). Also why limit ourselves to
John Kitchin writes:
> 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.
It is possible to rebuild regexps upon modifying a defcustom.
> Do you think we would eliminate `org-link-ty
+1 for all this.
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin 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
Hello,
John Kitchin 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 n
I think I have attached the right patch that does this.
Let me know what you think.
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin writes:
>
>> I took a stab at this implementation here:
>>
>> https://github.com/jkitchin/org-mode/compare/master...colored-link-2?expand=1
>
> Thank you.
>
> Co
Hello,
John Kitchin writes:
> I took a stab at this implementation here:
>
> https://github.com/jkitchin/org-mode/compare/master...colored-link-2?expand=1
Thank you.
Could you send the patch on the ML instead? It is better for commenting
and archiving. Also make sure to patch against master br
I took a stab at this implementation here:
https://github.com/jkitchin/org-mode/compare/master...colored-link-2?expand=1
I wasn't too sure of the defcustom :type syntax.
I also wasn't sure about this line
https://github.com/jkitchin/org-mode/compare/master...colored-link-2?expand=1#diff-cfe1a32c
That is also nice looking.
Rasmus writes:
> Nicolas Goaziou writes:
>
>> Hello,
>>
>> Rasmus writes:
>>
>>> Aside: This is what is done for specially colored source blocks.
>>
>> Duh. This totally eluded me.
>>
>>> But we can change that UI if you think.
>>
>> I think it would be nice to find
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.
I am ok with a single variable that is an a-list that combines face and
display.
Would you consider expa
Nicolas Goaziou writes:
> Hello,
>
> Rasmus writes:
>
>> Aside: This is what is done for specially colored source blocks.
>
> Duh. This totally eluded me.
>
>> But we can change that UI if you think.
>
> I think it would be nice to find a decent UI for that feature, indeed.
> With that naming co
Hello,
Rasmus writes:
> Aside: This is what is done for specially colored source blocks.
Duh. This totally eluded me.
> But we can change that UI if you think.
I think it would be nice to find a decent UI for that feature, indeed.
With that naming convention rule, you get neither docstring no
Nicolas Goaziou writes:
> 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.
Aside: This is what is done for specially colored source blocks. But we
can change that UI if you think.
--
Send
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin 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.
>>
>> (
Hello,
John Kitchin 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
Dear John,
I was wishing for this feature for a couple of years and would very much
like for this to become possible! While I do not exactly understand how you
are doing it, if it works that should be good enough.
Thanks a lot!
Christian
On 06/26/2016 10:35 PM, John Kitchin wrote:
Hi all,
Hi all,
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
:foregrou
21 matches
Mail list logo