unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Change in 28.1 in opening a file from grep results on Windows
Date: Wed, 13 Jul 2022 08:47:25 -0400	[thread overview]
Message-ID: <jwv7d4hyyok.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 838roxw6ov.fsf@gnu.org

>> 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.  ]


        Stefan




  reply	other threads:[~2022-07-13 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 15:36 Change in 28.1 in opening a file from grep results on Windows Pascal Quesseveur
2022-07-12 16:01 ` Eli Zaretskii
2022-07-12 16:31   ` Pascal Quesseveur
2022-07-12 16:50     ` Eli Zaretskii
2022-07-12 17:04       ` Pascal Quesseveur
2022-07-12 17:13         ` Eli Zaretskii
2022-07-12 17:23           ` Pascal Quesseveur
2022-07-12 16:22 ` Eli Zaretskii
2022-07-12 16:56   ` Pascal Quesseveur
2022-07-12 17:09     ` Eli Zaretskii
2022-07-12 17:20       ` Pascal Quesseveur
2022-07-12 17:29         ` Eli Zaretskii
2022-07-12 17:41           ` Pascal Quesseveur
2022-07-12 20:07     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-07-13 12:14       ` Eli Zaretskii
2022-07-13 12:47         ` Stefan Monnier via Users list for the GNU Emacs text editor [this message]
2022-07-13 16:08           ` Pascal Quesseveur

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv7d4hyyok.fsf-monnier+emacs@gnu.org \
    --to=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).