Cancelled. As I am now employed, I no longer can assign my copyright. Fortunately, inspired by Ihor's idea, I did complete the first part of what needed to be done with this patch: https://list.orgmode.org/87cxwa57dx.fsf@localhost/T/#t
That patch implemented verbatim link export for ox-html. The ox-md backend is obviously derived from ox-html. I'm not sure what the approach for using variables from a derived backend is. But once a solution is found for `org-html-base-directory', `org-html-link-use-abs-url' and `org-html-link-home', `org-md-link' can use the new function `org-export-file-relative-name-maybe` to convert file link paths into paths that point to other links in your project directory. See `org-html--create-file-link-path' for an example of how to use `org-export-file-relative-name-maybe. Of course, `org-export-file-relative-name-maybe` can also be used even without ox-md equivalents of `org-html-base-directory', `org-html-link-use-abs-url' and `org-html-link-home'. Le dim. 21 juin 2026 à 10:35, Ihor Radchenko <[email protected]> a écrit : > > Earl Chase <[email protected]> writes: > > >> #+HTML_LINK_HOME: https://www.example.com > >> > >> [[https://www.example.com/page/subpage/foo.html]] can be automatically > >> exported to <a href="/page/subpage/foo.html"> ... </a> > >> > >> That way, we will even keep the actual Org links inside the buffer working. > >> > > If I understand you correctly, you are basically saying that ox-md > > should just recognize `org-html-link-home'? ox-md is derived from > > ox-html so I think that is already the case. So really all I would > > need to do is add a variable like `org-html-home/up-format' to ox-md > > and then add special handling in the case `org-html-link-home' or > > `org-html-link-up' is defined, similar to what `org-html-template' > > does? > > Yes. Just like `org-publish-file-relative-name' understands relative file > paths. However, I am still not 100% sure about the use case scenario. Is > it about file links? Is it about https links? > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92>
