emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Latex preview + symbolic link + relatvie path bug


From: Emil Vatai
Subject: Latex preview + symbolic link + relatvie path bug
Date: Mon, 15 Jul 2024 23:22:29 +0900

The problem is very nicely described here. If there is a symbolic link to a directory, such that the original and link are at a different depth in the filesystem, org-mode latex preview fails. 

The bug and how to reproduce (a potential solution to it) can be found here:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-10/msg01152.html

Copy of the most relevant part:
> How to reproduce:
> 
> 1. Run `mkdir -p ~/a_dir/org'.
> 
> 2. Run `ln -s ~/a_dir/org ~/docs'.
> 
> 3. Run `emacs -Q ~/docs/example.org'.
> 
> 4. Insert into the file "$2+2=4$", press `C-c C-x C-l', and see that it
> does not work.
> 
> 5. Kill emacs.
> 
> 6. Run `emacs -Q ~/a_dir/org/example.org'.
> 
> 7. Insert into the file "$2+2=4$, press `C-c C-x C-l', and see LaTeX
> preview.
The link describes that one should use file-truename before file-relative-name. Ergo one possible solution could be adding file-relativename to a bunch of places, or if org-mode is hardwired to produce the files into /tmp, maybe relative paths should not be used (as far as I can tell, the error occurs when it tries to read ../../../tmp/orgtexRANDOM... which is actually /tmp/orgtexRANDOM...)


--
Emil Vatai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]