[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change in 28.1 in opening a file from grep results on Windows

From: Stefan Monnier
Subject: Re: Change in 28.1 in opening a file from grep results on Windows
Date: Wed, 13 Jul 2022 08:47:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Can you try setting up `directory-abbrev-alist`?
>> AFAIK it was introduced for similar purposes (e.g. for people using the
>> old `amd` automounter which turned /net/<host> into a symlink to
>> /tmp_mnt/<host>, but if you stopped using the symlink `amd` would then
>> unmount /tmp_mnt/<host> after a timeout and your direct access to
>> /tmp_mnt/<host> would then fail).
> That variable is supposed to be set up for each symlinked directory?
> I think that is only reasonable to expect if a symlink never changes,
> which is not what happens in this case, AFAIU.

It's a regexp match & replace, so to some extend a single entry can
handle various symlinks, but yes, it's static, and it requires manual
set up.

IIUC in his case, the symlink is still static: it can point either to
a remote directory or to a local disk, but that depends only on the
machine on which it's run, right?

We could write a function which takes a list of "possible symlinks" and
builds a set of entries for `directory-abbrev-alist` to try and convince
Emacs to use the "clean names using symlinks" in preference to the
target of those symlinks.
[ I seem to remember that I had such a function, many years ago, but
  somehow I can't find it any more, even though I'm pretty lazy when it
  comes to erasing unused code from my .emacs.  Maybe I dreamt it.  ]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]