GNU bug report logs - #54001
29.0.50; abbreviate-file-name has side-effects

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 14 Feb 2022 17:22:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, 54001 <at> debbugs.gnu.org
Subject: bug#54001: 29.0.50; abbreviate-file-name has side-effects
Date: Mon, 14 Feb 2022 13:38:58 -0800
[Message part 1 (text/plain, inline)]
On 2/14/2022 1:00 PM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> Looking at my original patch again, this value is already cached as a Tramp
>> connection property named "home-directory". If the code were changed to set
>> that connection property in a more-appropriate place, and
>> `tramp-handle-abbreviate-file-name' simply *reads* that connection property,
>> then I think that should resolve this issue.
> 
> Sounds like it,

I've only lightly tested this patch, but I think it should resolve the 
issue. It only sets the "home-directory" connection property when a 
connection is already established. Otherwise, it just uses the cached 
value (if any).

Maybe there's a cleaner way to do this though; opportunistically setting 
a connection property like this seems like something there might be a 
special function for in Tramp, but I didn't see one after a bit of 
looking so this is what I went with.
[0001-Don-t-attempt-to-connect-to-a-remote-server-during-a.patch (text/plain, attachment)]

This bug report was last modified 3 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.