Subject: Re: bug#57486: TRAMP resets all locale settings

From: Michael Albinus <[email-masked]>
Date: Thu, 15 Sep 2022 11:57:40 +0200

Paul Pogonyshev <[email-masked]> writes:

Hi Paul,

> Git commit c8c3cd3b08.
>
> Connect to any remote machine. Run `M-x eshell RET', then `$ locale'.
> Output:
>
> LANG=en_GB.UTF-8
> LANGUAGE=
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> ...
>
> All settings other than `LANG' are reset.
>
> In comparison, when I do the same with Emacs 28:
>
> LANG=en_GB.UTF-8
> LANGUAGE=
> LC_CTYPE="en_US.utf8"
> LC_NUMERIC="en_US.utf8"
> LC_TIME="en_US.utf8"

With commit be2e6228f8, Tramp has been changed to use rx. This has
introduced a nasty typo in tramp-get-remote-locale:

(rx bol (literal (car candidates))"%s" (? "\r") eol)

(see the superfluous "%s"), which prevents Tramp to recognize the proper
locale. It has been fixed in commit f1635c8efb3 some days ago.

Hopefully, the error is gone by this. COuld you pls check?

> Paul

Best regards, Michael.