Hi Aaron, Aaron Ecay <aarone...@gmail.com> writes:
> I suspect you may be targeting the wrong layer. Don't we want to use > org-link-protocols, not org-link-abbrev-alist? Protocols are already > handled by the exporter, so there should be no need for a change like > this one: > [...] I want to allow adding link protocols (what I called "adding link types") from #+LINK. >> Nicolas, do you think it is feasible/good to delay link expansion >> till the backend knows whether the abbreviated link is associated >> to follow/export function that would understand formatting strings >> in the abbreviated form? > > My proposal works without any changes to the exporter's structure > (except adding the #+BIBLIOGRAPHY keyword, which is a one-line > emendation). It does not allow the equivalent of your "#+LINK: > bib:%s;%s;%s" for specifying the pre/post delimiters, but maybe it > would be better from a standardization-of-syntax point of view to have > just one way of encoding them? IIUC your proposal introduces some syntactic glue here: [[type:key;pre;post][desc]] ^ ^ If we allow this, it's better to allow this in general than just for a specific link type. Hence my proposal to extend link abbreviation to be recognized as new link types when the #+LINK line contains more than two strings. See for example this new link type (or "protocol"): #+LINK: with-title::%s http://orgmode.org/worg/doc.html# nil org-html-link-with-title [[with-title::org-mode::A link title][org-mode]] org-html-link-with-title would then take care of exporting this as a link like <a href="..." title="A link title">org-mode</a>. There are really two changes here: 1. extending #+LINK so that the third and fourth strings are recognized as follow and export functions 2. extending #+LINK so that a formatting string in the link abbreviation name is handle later on by those functions. What do you think? -- Bastien