From: Eli Zaretskii <eliz@gnu.org>
To: Bogdan Ruslanovich Drozd <bogdan.ruslanovich.drozd@yandex.com>
Cc: 66638@debbugs.gnu.org
Subject: bug#66638: 29.1; `file-relative-name' and symbolic links
Date: Thu, 19 Oct 2023 17:12:39 +0300 [thread overview]
Message-ID: <83fs26u2eg.fsf@gnu.org> (raw)
In-Reply-To: <87a5sed99n.fsf@yandex.com> (message from Bogdan Ruslanovich Drozd on Thu, 19 Oct 2023 16:36:20 +0300)
tags 66638 notabug
thanks
> From: Bogdan Ruslanovich Drozd <bogdan.ruslanovich.drozd@yandex.com>
> Date: Thu, 19 Oct 2023 16:36:20 +0300
>
> How I found the bug: LaTeX previews were not displayed in Org mode
> because the path where the file lies contains a symbolic link
> (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a
> symbolic link to a directory).
>
> Bug description: `file-relative-name' (in `files.el') doesn't take into
> account symbolic links.
>
> 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.
This is not a bug. If you want to resolve symlinks in a file name,
use file-truename before calling file-relative-name. The latter is
purely a syntactic function which merely analyzes its file name
argument, and should not hit the disk.
next prev parent reply other threads:[~2023-10-19 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 13:36 bug#66638: 29.1; `file-relative-name' and symbolic links Bogdan Ruslanovich Drozd
2023-10-19 14:12 ` Eli Zaretskii [this message]
2023-12-22 14:57 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83fs26u2eg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=66638@debbugs.gnu.org \
--cc=bogdan.ruslanovich.drozd@yandex.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.