GNU bug report logs -
#67930
29.1; emacs 29.1 follows symlinks when a grep result is selected
Previous Next
Full log
Message #8 received at 67930 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 20 Dec 2023 13:54:19 +0000
> From: Jurgen De Backer via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Since emacs 29.1 (possibly already in 28.x), symlinks are resolved
> whenever a file is selected in a grep result in the *grep* buffer.
> For our project, we preferred the old behaviour to remain in the symlink's
> directory.
> Also, when symlinks are resolved and a new grep is done, we may end up
> grepping in another directory than we started from.
>
> Attached is a patch o revert the behaviour, and to add a custom
> variable compilation-follow-symlinks to disable/enable this behaviour.
>
> It may be useful to allow the user to select either behaviour.
Thanks, but I don't think this is a matter of user preferences. We
replaced expand-file-name there by file-truename because in some cases
the former doesn't work: it expands to a file that doesn't exist. See
bug#8035, where such cases are presented. We cannot ask the user to
set or reset this option each time they need to work with these or
those file names.
So I don't think the fix you propose is the right one. I think we
need to use expand-file-name where it works, and file-truename where
expand-file-name doesn't work. Or maybe just try expand-file-name
first, and if that produces a file name that fails file-exists-p, try
file-truename.
Would you like to propose and test a patch along these lines?
This bug report was last modified 1 year and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.