"Nicholas Coltharp" <[email protected]> writes: > I have attached a patch that addresses the issue (in my testing). Basically, > whenever an ID link is encountered during export, we open the corresponding > file and check whether that matches the file's ID. If it does, we transcode > to an HTML link with no anchor. > > The big caveat here is that opening a file each time an ID link is > encountered could cause performance problems. > > In theory, :id-alist in the communication channel could carry information > about whether a given ID corresponds to a file or a header. However, that > would be a big change for a niche problem.
I think you can modify `org-export--collect-tree-properties' to store string with properties (set with org-element-put-property) in :id-alist. Then, `org-html-link' can check string property returned by (org-export-resolve-id-link link info) with org-element-property and act specially for file 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>
