emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [QUESTION] Org "customid" and "coderef" links seems not fontified as


From: Nicolas Goaziou
Subject: Re: [QUESTION] Org "customid" and "coderef" links seems not fontified as other file: link
Date: Fri, 22 May 2020 17:21:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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.

Help welcome.

Meanwhile, your best bet is to defadvice `org-activate-links'.

Regards,

-- 
Nicolas Goaziou



reply via email to

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