Subject: bug#75363: 29.3; compile-goto-error eliminates symbolic links

From: Eli Zaretskii <[email-masked]>
Date: Sat, 04 Jan 2025 21:03:19 +0200

> Date: Sat, 4 Jan 2025 15:26:12 +0000 (UTC)
> From:  Anders Gustavsson via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Create a directory, a file and a shortcut in the file system:
> 
> cd
> mkdir -p path/to/long/directory/in/file/system
> echo "hello" > path/to/long/directory/in/file/system/file
> ln -s path/to/long/directory/in/file/system/ shortcut
> 
> In emacs
> 
> C-x C-f shortcut
> M-x grep <ret> hello * <ret>
> 
> in the output mouse-1 on
> 
> file 1:hello
> 
> Then type: C-x C-b
> 
> Then you see that the filename of the file found in the grep output is 
> ~/path/to/long/directory/in/file/system/file
> 
> not ~/shortcut/file as you would have expected, and how it was before in
> emacs version 27.1. Same thing happens in emacs 29.4.

I think this is already fixed in Emacs 30, where it only resolves
symlinks if the shortcut name cannot be found by find-file.

Can you try the latest pretest of Emacs 30.1?  Its tarball is here:

  https://alpha.gnu.org/gnu/emacs/pretest/emacs-30.0.93.tar.xz