emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex preview + symbolic link + relatvie path bug
@ 2024-07-15 14:22 Emil Vatai
  2024-07-15 14:32 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Emil Vatai @ 2024-07-15 14:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

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 <http://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 <http://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

[-- Attachment #2: Type: text/html, Size: 1832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-15 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15 14:22 Latex preview + symbolic link + relatvie path bug Emil Vatai
2024-07-15 14:32 ` Ihor Radchenko
2024-07-15 14:39   ` Emil Vatai
2024-07-15 14:44     ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).