emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Emil Vatai <emil.vatai@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Latex preview + symbolic link + relatvie path bug
Date: Mon, 15 Jul 2024 23:22:29 +0900	[thread overview]
Message-ID: <CA+AfvvCPCTsGMD7oP_q9mdJ9Ts1OkSeesvnt09VO1SJ9n6Q9uA@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2024-07-15 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 14:22 Emil Vatai [this message]
2024-07-15 14:32 ` Latex preview + symbolic link + relatvie path bug Ihor Radchenko
2024-07-15 14:39   ` Emil Vatai
2024-07-15 14:44     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+AfvvCPCTsGMD7oP_q9mdJ9Ts1OkSeesvnt09VO1SJ9n6Q9uA@mail.gmail.com \
    --to=emil.vatai@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).