From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Change in 28.1 in opening a file from grep results on Windows Date: Wed, 13 Jul 2022 08:47:25 -0400 Message-ID: References: <82y1wy8hrh.fsf@gmail.com> <83tu7mwbav.fsf@gnu.org> <82czea8e1w.fsf@gmail.com> <838roxw6ov.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21396"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:DMSzZUtyhUpy/F7rwFc7D56pLcw= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 13 14:51:08 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBbpc-0005RE-LI for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 13 Jul 2022 14:51:08 +0200 Original-Received: from localhost ([::1]:34198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBbpb-000336-ET for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 13 Jul 2022 08:51:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBbmA-000875-LZ for help-gnu-emacs@gnu.org; Wed, 13 Jul 2022 08:47:35 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:34470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBbm9-0005W4-4t for help-gnu-emacs@gnu.org; Wed, 13 Jul 2022 08:47:34 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oBbm6-0000VT-4f for help-gnu-emacs@gnu.org; Wed, 13 Jul 2022 14:47:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138457 Archived-At: >> 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/ into a symlink to >> /tmp_mnt/, but if you stopped using the symlink `amd` would then >> unmount /tmp_mnt/ after a timeout and your direct access to >> /tmp_mnt/ 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