From: Eli Zaretskii <eliz@gnu.org>
To: Jurgen De Backer <jurgen.de-backer.ext@eurocontrol.int>
Cc: 67930@debbugs.gnu.org
Subject: bug#67930: 29.1; emacs 29.1 follows symlinks when a grep result is selected
Date: Wed, 20 Dec 2023 20:46:33 +0200 [thread overview]
Message-ID: <83edfghfue.fsf@gnu.org> (raw)
In-Reply-To: <80q7cl9dlo4.fsf@eurocontrol.int> (bug-gnu-emacs@gnu.org)
> 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@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?
next prev parent reply other threads:[~2023-12-20 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 13:54 bug#67930: 29.1; emacs 29.1 follows symlinks when a grep result is selected Jurgen De Backer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-20 18:46 ` Eli Zaretskii [this message]
2023-12-22 16:20 ` DE BACKER Jurgen (EXT) via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-23 11:10 ` Eli Zaretskii
2024-01-04 11:10 ` DE BACKER Jurgen (EXT) via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-06 10:35 ` Eli Zaretskii
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=83edfghfue.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=67930@debbugs.gnu.org \
--cc=jurgen.de-backer.ext@eurocontrol.int \
/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.