GNU bug report logs - #71972
31.0.50; Tramp does not parse ipv6 address with port correctly

Previous Next

Package: emacs;

Reported by: Yikai Zhao <yikai <at> z1k.dev>

Date: Sat, 6 Jul 2024 12:25:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Fixed in version 30.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 71972 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Yikai Zhao <yikai <at> z1k.dev>
Cc: 71972 <at> debbugs.gnu.org
Subject: Re: bug#71972: 31.0.50; Tramp does not parse ipv6 address with port
 correctly
Date: Sun, 07 Jul 2024 12:28:45 +0200
[Message part 1 (text/plain, inline)]
Yikai Zhao <yikai <at> z1k.dev> writes:

> Hi,

Hi,

> Thanks for the patch. However, with this patch applied to master, the result is:
>
> (tramp-dissect-file-name "/ssh:[2001::abcd]#2202:/tmp/xxx")
> => (tramp-file-name "ssh" nil nil #("Oldtown" 0 7 (tramp-default t))
> "2202" "/tmp/xxx" nil) [2 times]
>
> ("oldtown" is my local hostname). Although the port is correctly
> parsed, the host is now incorrect.

Indeed, we have a race condition. tramp-host-with-port-regexp is defined
before tramp-set-syntax has run.

Could you, please, try the appended patch indeed?

> Also note that in master, the correct file path for tramp.el is
> lisp/net/tramp.el, so I had to manually edit your patch before
> applying it. What version is your patch based on? Maybe the result is
> different in different versions?

I develop in the Tramp git repo. The files are identical with the ones
in the Emacs git repo. However, there is a different directory structure.

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

This bug report was last modified 314 days ago.

Previous Next


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