Hi everybody. Here I am with yet another need for an Org solution. There should not be much remaining! I'm sure they *all* say that... :-)
I have a set of Org files with links to one another, for which I publish a dozen Web sites or so (using org-publish-project-alist). Whenever a link is within the same file, or a neighbouring file in the same directory (file:*.org style), links are properly converted to HTML references. When the links point to Org files which are a bit more away, "file:" is not converted to "html:", understandably. So I see myself writing either "file:" or "html:" links depending on the fact I know that Org will, or will not, do the expected conversion. The problem with writing "html:" is, of course, that I cannot follow these links while editing. So, I wonder if the conversion capabilities could not be augmented or automated somehow, allowing me to always use "file:" in the Org file themselves. A while ago, for each site within org-publish-project-alist, I already added a specification line: :top-url "http://SOME.WEB.SITE" as it seemingly did not break anything to do so, to save the information somewhere I could easily find it. I'd like to write some glue code to help this, maybe someone could hint me in the proper direction, or maybe suggest other avenues? I tried to read org-exp.el and org-html.el a bit, but they still are a bit too magical, I do not see how they work. Currently, here is what I would like to achieve: whenever there is a "file:*.org" link which is not translatable with the current algorithms, there is presumably some code somewhere, able to determine the site (from org-publish-project-alist) that would publish that referenced file. If that site is found, and if the site has a :top-url attribute, its value could provide a base to build the proper URL to translate the link. Would remain to hook the link conversion, likely within the current code in org-html.el; but as of now, I do not understand it enough to do (or at least, do cleanly). François