On 01/11/2022 12:47, Ihor Radchenko wrote:
Max Nikulin writes:
In HTML <a href="#">top</a> or #top works as a link to the beginning of
the document. I am curious if ODF has a similar feature. I mean ID at
the top of the same file that generates file.org link instead of
internal one for both HTML and ODF formats.
Currently, we have no convention.
In Org mode:
- [[file:/path/to/self]] links will do nothing, or follow org-file-apps.
- [[if:document-property-drawer-id]] links will move point to the top
What about export?
- Should we treat links as file links to the original Org file?
(One can argue that it is a good default is one wants to write
something like: "This document has been generated from
file:/link/to/source.org"
- Should we treat them as "jump to top", similar to our id: link
behaviour in Org?
I'd say that retaining the current behaviour will be the most reasonable.
From my point of view "id:" link to the top of the same file should be
exported as a link to the beginning of the exported document.
- ox-odt creates a link to file.org
- ox-html to file.html#ID-...
I believe in both cases it should be just "#ID-..." or "#top" in the
case of HTML.
I do not see much utility to linking to exported document itself, while
I do see a utility to link to the original file.
I forgot about "link to source" use case. I have no idea how to
distinguish cases when a user links .org source files or exported files
(currently works for HTML only). It is applicable to both same and other
files. Ideally user should have choice for each link.