[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [QUESTION] Org "customid" and "coderef" links seems not fontified as
From: |
stardiviner |
Subject: |
Re: [QUESTION] Org "customid" and "coderef" links seems not fontified as other file: link |
Date: |
Sat, 23 May 2020 09:16:59 +0800 |
User-agent: |
mu4e 1.4; emacs 28.0.50 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> stardiviner <address@hidden> writes:
>
>> I have following minimal testing code:
>>
>> #+begin_src emacs-lisp
>> (defun org-link-beautify (start end path bracketp)
>> "Display icon for the Org link type."
>> (message
>> (format "start: %s, end: %s, path: %s, bracketp: %s" start end path
>> bracketp)))
>>
>> (dolist (link-type (mapcar 'car org-link-parameters))
>> (org-link-set-parameters link-type :activate-func #'org-link-beautify))
>> #+end_src
>>
>> The ~message~ does not print parameter values at all. I guess those
>> "customid"
>> [[#Usage] and "coderef" (coderef) are different with "file:" etc links. Is
>> this
>> true? Here is my complete source code I want to try fontify customid and
>> coderef
>> links.
>>
>> https://github.com/stardiviner/org-link-beautify/blob/master/org-link-beautify.el#L67
>>
>> Is there any way to fix this problem?
>
> [[#cusom]], [[*headline]], [[(coderef)]] or, simply [[target]], are
> internal links, with a special syntax. In particular, they do not go
> through the `org-link-parameters' process.
>
> We could integrate them in that variable, i.e., extract the "follow"
> function from `org-link-open', handle completion, storage, with
> dedicated functions, etc.
That's a good solution, will be simple for future links manipulation.
>
> Help welcome.
Sure, anything I can help you can say.
>
> Meanwhile, your best bet is to defadvice `org-activate-links'.
I read the function `org-activate-links' source code, I guess you mean I can
advice on the `properties' let-binding variable. Add `'display' text property,
right? I don't know how to add advice for this functionality. Do you have any
sample code for hinting? I will be much thankful.
Regards,
- --
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7IeYsUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsNjbggAlcDuPz9vXMC62NSZYf0WRIwD0893
UTsRr8sLlVWtIQV7eZ764mDrd7uOwzNnYTcBS2MbopzLs7sBRg4i6hmqKhAJFCYf
RuNJNnWg8oNQhiOTuN7eBRMIIv7k741T5H/8F4MdzX3KvtXhjoNjFm2BUdtwtWLl
UMAbazuRaDtjY3+sPtcGkXk6ZmkNtCh3LoPMYkfeq4dGXWantvlxDO6EYoJI+Klm
mPlqKXRSsVaZLbzxqAuqrQhIZog2gq+0nla2uqKTAocdNtTvWGqtlEbMd5p/BYB3
f/YGeFfJH5FeXIiuxZuFK83sVtpf1H3jtenHWQciuj+sqKgRN9acOi+bdg==
=tMva
-----END PGP SIGNATURE-----