GNU bug report logs -
#42045
27.0.91; display-format-alist for X11 does not recognize DISPLAY with IPv6 literal
Previous Next
Reported by: Valtteri Vuorikoski <vuori <at> notcom.org>
Date: Thu, 25 Jun 2020 19:21:01 UTC
Severity: normal
Found in version 27.0.91
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 9/1/20 5:36 PM, Robert Pluim wrote:
>>>>>> On Thu, 25 Jun 2020 22:20:05 +0300, Valtteri Vuorikoski <vuori <at> notcom.org> said:
>
> Valtteri> If the DISPLAY environment variable is to an IPv6 literal such as
> Valtteri> [::1]:1, the regexp that x-win.el adds to the display-format-alist to
> Valtteri> recognize X11 does not match, which results in breakage.
>
> Valtteri> x-win.el should probably add a second regexp to the alist, such as:
> Valtteri> (add-to-list 'display-format-alist '("\\`\\[[^]]*\\]:[0-9]+\\(\\.[0-9]+\\)?\\'" . x))
>
> That regexp won't work, since now youʼre requiring the '[' and ']' to
> be present.
>
> "\\`\\[?[^]]*\\]?:[0-9]+\\(\\.[0-9]+\\)?\\'" would fix that, but since
> we donʼt really care what comes before the ':', so would
>
> "\\`.*:[0-9]+\\(\\.[0-9]+\\)?\\'"
Yes, note "second regexp": the current regexp would remain and match
other types of hostnames/addresses. But if no one cares about the format
of the host part, your version is simpler.
-Valtteri
This bug report was last modified 3 years and 341 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.