[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65120: 29.1; directory-abbrev-alist breaks various things when insid
From: |
Eli Zaretskii |
Subject: |
bug#65120: 29.1; directory-abbrev-alist breaks various things when inside an abbreviated directory |
Date: |
Wed, 09 Aug 2023 16:21:46 +0300 |
> From: Sean Allred <allred.sean@gmail.com>
> Cc: Sean Allred <allred.sean@gmail.com>, 65120@debbugs.gnu.org
> Date: Wed, 09 Aug 2023 06:28:55 -0500
>
> So, I'd like to shorten this $MegaCorpSource path using built-in
> functionality where possible. My users aren't going to care about most
> of the path components. I can roll my own, but is there something like
> `abbreviate-file-name' that doesn't assume we're working with symlinks?
> (Should/could there be? Thoughts on whether or not it is A Good
> Idea(tm)?)
I don't think there's something in Emacs. But you can use
directory-abbrev-alist if you define a drive (using 'subst') that
would remove the need for using the full file name. Something like
subst x: C:\$MegaCorpSource
Then you could use "x:/" in directory-abbrev-alist. This actually
matches the "symlink" idea of this feature on Unix.
(Yes, I know: corporate IT doesn't like SUBST very much, either. But
maybe you will be lucky...)