Subject: bug#78791: closed (Re: bug#78791: 30.1; Tramp reopening file with sudo after disconnect error message)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 16 Jun 2025 08:17:02 +0000

Your bug report

#78791: 30.1; Tramp reopening file with sudo after disconnect error message

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78791: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78791
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78791: 30.1; Tramp reopening file with sudo after disconnect error message
From: Michael Albinus <[email-masked]>
To: Alexis Bakatine <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Mon, 16 Jun 2025 10:16:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Alexis Bakatine <[email-masked]> writes:

Hi Alexis,

> tramp-show-ad-hoc-proxies is working perfectly for what I described.
>
> Thank you a lot for the explanation and solution Michael.
> Feel free to close the non-bug and I wish you a great day.

Thanks for the feedback, I'm closing the bug.

> Best regards,
> Alexis

Best regards, Michael.

Subject: 30.1; Tramp reopening file with sudo after disconnect error message
From: Alexis Bakatine <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sat, 14 Jun 2025 19:23:17 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, when I'm trying to open a file from a Dired buffer with sudo after a
disconnect with Tramp, it results in an error message.

How to reproduce:

1. emacs -Q '/ssh:foo@bar|sudo::'
2. M-x tramp-cleanup-all-connections
3. 'o' or <RET> to open a file

result in *Messages*:
Host name 'bar' does not match ‘\`\(?:t480s\|\(?:127\.0\.0\.1\|::1\|ip\(?:6-lo\(?:calhost\|opback\)\|v6-lo\(?:calhost\|opback\)\)\|localhost[46]?\)\)\'’

Note that when NOT using sudo as with /ssh:foo@bar:, I can run M-x
tramp-cleanup-all-connections and open a file without problem,
Tramp reconnects automatically.

Tested on Emacs 30.1 and 31.0.50 on Linux.

Best regards,

Alexis