0

I have stored a link to a shell command, which contains inverted commas ", and I would like to export it to odt. For example, if I try to export the following link

[[shell:TDIR="/home/myusername/Templates/yyyy_mm-elsarticle"][make dir]]

into docx, when the output file is opened I get the following error message

error message

Note how the highlighting of the opened link stops just before the second " screenshot of link

I am using org-mode 9.5.2 in emacs 28.1.

Update

FYI, I've found another use case where the export fails: a link to a docx with whitespaces in the filename that is inside of a table environment, i.e,

| [[file:/home/myusername/Templates/F225883 report.docx][report1]] |

I know that whitespaces is something to be avoided in linux, but as everyone knows non-linux users don't know/do this :-). I will try the proposed solutions and report back. Thanks!

Ajned
  • 672
  • 4
  • 19
  • 1
    I don't know what your real use case might be, but in this case, the double quotes are superfluous, so you can get rid of them. The parsing of links is fraught with dangers and I can believe that the ODT exporter might be buggy in this respect (and surely in other respects as well), but this seems to be a case of "Doctor, it hurts when I do this!", where the answer is: don't do that. You might also be better off (no guarantees: I haven't tried it) with the third-party ODT exporter from [here](https://github.com/kjambunathan/org-mode-ox-odt). – NickD Dec 13 '22 at 20:59
  • @NickD thanks! This use case is not as critical and can be avoided in the way you suggest. However, I've found another one (see above) where the same problem shows up, it is more likely to happen, and in previous versions of org-mode it used to work. – Ajned Dec 14 '22 at 09:46
  • In the second case, did you try to export to HTML? Did it work? IOW, is it a general export bug or is it specific to the ODT exporter? – NickD Dec 14 '22 at 13:53
  • I can't reproduce the second problem with Org mode version 9.6 (release_9.6-99-gcea5af) in the sense that the export does not fail - the results look OK too, but I haven't looked closely. – NickD Dec 14 '22 at 14:10

0 Answers0