[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUG] ox-odt file: links are not pointing to the real files (was: [BUG]
From: |
Ihor Radchenko |
Subject: |
[BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]) |
Date: |
Sat, 22 Oct 2022 05:03:46 +0000 |
Max Nikulin <manikulin@gmail.com> writes:
> I am sorry. I confused this thread with some other bug report. I agree
> that the original post describes namely file links. When Moritz provided
> an example in response to your request for more details I decided that
> more similar problems are coming. Perhaps particular use case does not
> include links to specific headings in files and I was wrong. On the
> other hand if ox-odt code works with id links better than ox-html then
> the former may be a source of inspiration how to fix the latter.
I am not sure which bug you are referring to.
>> Here, we at least fix the export error. So that people can at least get
>> some exported .odt file.
>
> I have tried main HEAD (your fix should be applied) and I did not get an
> error, but the result is quite strange. Consider a single file with an
> internal link:
>
> :PROPERTIES:
> :ID: 3c885843-13ad-4dd8-a57f-de8271403b85
> :END:
> #+TITLE: Note A
>
> * H 1
> Some text
>
> * H 2
> [[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]]
>
> Link in the exported document:
>
> <text:a xlink:type="simple" xlink:href="test-odt.org">Link to Note
> A</text:a>
>
> I would expect a target withing the same .odt file.
>
> Properties as displayed in LibreOffice UI are even more peculiar:
> Document path
> file:///tmp/d/test-odt.odt/test-odt.org
> Target in document is empty.
>
> My expectation for path is file:///tmp/d/test-odt.odt or at least
> file:///tmp/d/test-odt.org, but certainly not their combination. I am
> unsure if you consider this observation as relevant to this thread.
I improved the code a bit, directly reusing file: link transcoder:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2f5e7103e59f06631e985d3dd39af21b5b7464ea
However, it does not change your observed behaviour.
I also tried the following Org file, and it looks like something is wrong
about file: link export in ox-odt. Even file: links have the erroneous
document path.
Probably, href=file.org is treated as a link to resource packed inside
.odt file.
I tried to look through
https://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators, but I
cannot see any obvious correct way to link to external files from odt.
May someone more familiar with ODT schema take a look?
:PROPERTIES:
:ID: 3c885843-13ad-4dd8-a57f-de8271403b85
:END:
#+TITLE: Note A
* H 1
Some text
* H 2
[[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]]
[[file:test.org]]
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Ihor Radchenko, 2022/10/18
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Moritz Schäfer, 2022/10/19
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Ihor Radchenko, 2022/10/19
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Max Nikulin, 2022/10/20
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Ihor Radchenko, 2022/10/20
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Max Nikulin, 2022/10/21
- [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]),
Ihor Radchenko <=
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Max Nikulin, 2022/10/22
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Ihor Radchenko, 2022/10/23
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Max Nikulin, 2022/10/24
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Max Nikulin, 2022/10/25
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Ihor Radchenko, 2022/10/31
- Re: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]), Max Nikulin, 2022/10/31
- Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)], Ihor Radchenko, 2022/10/21