Subject: bug#54606: 27.1; next/previous image command in image-mode triggers tramp connections for all remote dired buffers

From: Phil Sainty <[email-masked]>
Date: Fri, 01 Apr 2022 07:09:38 +1300

On 2022-04-01 00:41, Lars Ingebrigtsen wrote:
> Michael Albinus <[email-masked]> writes:
> 
>>> Can we put some guards in there to decide whether or not dir
>>> and default-directory are actually on the same host before
>>> comparing them via file-truename?
>> 
>> If you want to go *this* direction, there would be a simple change:
>> 
>> 	             (equal (file-remote-p dir)
>> 		            (file-remote-p default-directory))
>> 
>> file-remote-p doesn't do anything on wire.
> 
> I think that sounds like a good change here anyway.

Agreed -- if I'd checked to see what file-remote-p actually
returned, I would done this myself from the outset.

I've tested this approach in isolation, and it works well
in my test instance.

I've not yet tested to see whether the `non-essential'
change is similarly efficient in a newer version with a
similar session.

Lars' suggestion of having these commands NOT checking
every dired buffer every time also seems very sensible.

-Phil