From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#51321: 29.0.50; date in modelines Date: Tue, 02 Nov 2021 19:10:46 +0300 Message-ID: References: <83bl35o95u.fsf@gnu.org> <83cznkm25j.fsf@gnu.org> <838ry8lzal.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin) Cc: Alan Third , nisoni@algon.dk, stefan@marxist.se, 51321@debbugs.gnu.org, larsi@gnus.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 02 17:26:07 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhwbt-00045y-N4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Nov 2021 17:26:07 +0100 Original-Received: from localhost ([::1]:53198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhwbs-0003gf-0k for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Nov 2021 12:26:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhwNK-0008HB-Hu for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 12:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhwNK-0006iV-0h for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhwNJ-0003UE-Rn for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 12:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Nov 2021 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51321 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51321-submit@debbugs.gnu.org id=B51321.163586945513376 (code B ref 51321); Tue, 02 Nov 2021 16:11:01 +0000 Original-Received: (at 51321) by debbugs.gnu.org; 2 Nov 2021 16:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:37886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhwND-0003Tf-4q for submit@debbugs.gnu.org; Tue, 02 Nov 2021 12:10:55 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhwN9-0003TV-PW for 51321@debbugs.gnu.org; Tue, 02 Nov 2021 12:10:54 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7094C5C0041; Tue, 2 Nov 2021 12:10:51 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Nov 2021 12:10:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= XI/SAf04G2/pcKBLGZIwATwZMCqHBOqSkGGk69ETocY=; b=TG8yzGMpdSAYKmY1 jQMXzrNDAoHS0+INyOxTJgGzVqAFA6yUMBWfJRnG5fW8QDlxpRNKJyicMubfCj/S 3AiImjk+lYsgqZoD7FnOs+FAet6KYNyROlhpZvPjXOklcIglbEyRG2IMz48sxJex eU+MRlSnGWbH3ATXpg5rHWBYFSpmUc10Ypqe68GpLUPN2JlahwGAvfCeDOw1KIdS v9YrnPz7vwKL12aPN3NpwjVbQ9JsaehLb0aS+zsfn+O6tIX4MT+cyO77adyTorlb YnmO8fq59D8GCcY8FYIiReH+dBsJLRDBT8SmCoVuONq0BE4Zg30mL0XsYKkHawby pnmO1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=XI/SAf04G2/pcKBLGZIwATwZMCqHBOqSkGGk69ETo cY=; b=h6Yp6X5dksRDyueSH6ieoPCl90oFvpWW/gIOamettP4rEh/MC87QoC70y 5XZxPvN/NvEJ+4R2yJfthgRjra2J7C7Pdhys0J0T4kwxaz/Oj2gR+1RA32u7AOIl DhPIEcN0PkoZyEF8Uf7283a78ldRtUedUU01ZuV/bYsgUbYg0HBIFUT7sWKzzkZ3 oRoB0jQvyZxt2/qidKpEwDqmdSZ7Md4Wd/P03CBWdG1MR5O1RB03ybA3rye7sZiG UQClnPGr4bLsnaii5HhhzCZFG8QL6OOQYbXxJ7bM1GOsRLzcpHyetNGdaVx4Xqqp 5GmMaFVYhLtTf+6XX9Q/dBILzCDlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtddtgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpefhihhlihhp phcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecuggftrf grthhtvghrnhepkedvkeduledvtddvleevjeegtedugfdvlefgfeetgfekjeehheevhffg teffiefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Nov 2021 12:10:49 -0400 (EDT) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Mon, 01 Nov 2021 23:17:15 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218816 Archived-At: On 01/11/2021 23:17 +0100, Daniel Mart=C3=ADn wrote: > Alan Third writes: > >> >> I know almost nothing about the locale, but from reading the man pages >> I can't understand why we need to set LC_ALL when we're already >> setting LANG. Isn't LANG the fallback if LC_ALL isn't set? > > You are right. Setting LANG should be all that is needed and I think my > patch should be reverted. > > I'm still confused by Niels's issue, though. Given the screenshot he > showed, LANG should have been set to da_DK.UTF-8, which should show the > weekday in Danish: > > $ LANG=3Dda_DK.UTF-8 date +%c > Man 1 Nov 22:41:33 2021 > > Perhaps the way he launches Emacs inherits a LANG variable already set > to English. Or there is a wrapper in some custom Emacs NS distribution > that sets LANG to English beforehand. Anyway, I think it's a > configuration problem somewhere, unrelated to Emacs, that should be > handled by the user overriding the time locale manually: > > (setq system-time-locale "da_DK.UTF-8") > > WDYT? Sorry, in retrospective, I think I didn't do the absolutely > correct thing here. I found that coreutils date and macOS date differ in behavior: coreutils: LANG=3Dru_RU.UTF-8 LC_ALL=3D /opt/local/libexec/gnubin/date +%c Tue Nov 2 18:55:19 2021 macOS: LANG=3Dru_RU.UTF-8 LC_ALL=3D /bin/date +%c =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, 2 =D0=BD=D0=BE=D1=8F=D0=B1=D1= =80=D1=8F 2021 =D0=B3. 18:54:52 Then, I looked at other LC_ variables, from them only LC_CTYPE=3DUTF-8 is set (I don't know by whom, it's certainly not in my shell init files) And if I invoke coreutils date like this: LANG=3Dru_RU.UTF-8 LC_ALL=3D LC_CTYPE=3D /opt/local/libexec/gnubin/date +%c =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, 2 =D0=BD=D0=BE=D1=8F=D0=B1=D1= =80=D1=8F 2021 =D0=B3. 19:07:29 The output is localized. So maybe Daniel also has that LC_CTYPE variable set somewhere in macOS, and is using coreutils date, and that prevents him from getting localized date as expected.