Bastien <b...@altern.org> writes:

> This are the typical text properties for an Org-mode link:
>
>   face                 org-link
>   help-echo            "LINK: http://bonjour.fr";
>   mouse-face           highlight

These three properties (face, help-echo, mouse-face) are general, which
would require htmlize to deduce URLs from them much like it now deduces
URLs by examining buffer text.  I would like to offer a better
alternative.

What I had in mind is a general property that marks a URI reference.
For example, a `uri-ref' property could refer to the URI that would
cause htmlize to generate an <a href="..."> link, `browse-url' to react
to mouse clicks to that area, etc.  The property value would typically
be a string containing the URI, but could also be a plist describing the
reference.

;; just the URI
(put-text-property beg end 'uri-ref "http://bonjour.fr";)

;; the same, with the ability to specify additional props of this ref
(put-text-property beg end 'uri-ref '(:uri "http://bonjour.fr";))

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to