From unknown Fri Aug 15 04:04:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#39248 <39248@debbugs.gnu.org> To: bug#39248 <39248@debbugs.gnu.org> Subject: Status: format-time-string ignores user's preferred locale Reply-To: bug#39248 <39248@debbugs.gnu.org> Date: Fri, 15 Aug 2025 11:04:56 +0000 retitle 39248 format-time-string ignores user's preferred locale reassign 39248 emacs submitter 39248 "Paul W. Rankin" severity 39248 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 22:53:04 2020 Received: (at submit) by debbugs.gnu.org; 23 Jan 2020 03:53:04 +0000 Received: from localhost ([127.0.0.1]:51574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuTYG-0005iE-9m for submit@debbugs.gnu.org; Wed, 22 Jan 2020 22:53:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:48197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuTYF-0005i7-51 for submit@debbugs.gnu.org; Wed, 22 Jan 2020 22:53:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54705) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuTYD-0001d2-QW for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 22:53:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuTYC-0006ve-O9 for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 22:53:01 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:53517) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuTYC-0006oR-A3 for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 22:53:00 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5C2CA3DF for ; Wed, 22 Jan 2020 22:52:57 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 22 Jan 2020 22:52:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=C+ffT+gKvLN0iXgQdSykAOBkej XKC5bnsNmd9I131mE=; b=aoD/KFNqr6WqYOW0zmQKAOKbFD/oSN29APNRRa54ww EGnxWqaRYyVyzd4RKMqK+2xAsrjNtJEXn99srEYyTOwb2xFZJNcYWe+4qJjFMYT9 FHBUZ2ezOqtM1EJC+kBpdO2v2ffMwf4usWxO8QEkEdVPDX43DtYUJY1lmxRYAKIi TlP0rm1iWLxe8JE4884WXnDbaAHGMXPE4CipC5fH6/V1ZM/Bzd534GFibklE4ucx Iru3sikyNkh/XDwlLMXFzNExacVyFnP2uHCq0HZjZ25DXPlKhBVBEUSD15hK7bS3 Y3TS6mG9J8Ye8iziwjU/JT+j/gkxU8UZyU2VomeBc2Uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=C+ffT+ gKvLN0iXgQdSykAOBkejXKC5bnsNmd9I131mE=; b=gVm89+fdClHTFUrFe1YwUY CqI5GczMUt3komY1a6z6mOrusRP3EYgGuSVQQziPmOLOyOtN6zeBGX8iJZfyW7Yy erCbjT06rWqx2f1NhV5mjI9fvbs75hvFOrd2O/pecVY/+m+AyC/HsRAjToZrI3Lj sdGm/Pe7r6zB/bERL1KDnEzuvUSMgsVH/WOwlBZDM02eSYAi2gxvitvsLdSoNC54 y04f3fhiyTZnqq2I3nq6ih1DKOaX3zYF4b1OcC6IGP3JChZq81dar2R+j9dK8jj7 3Rn+lppvO2QjG9huknmUjgZIP0J9zYwcdabh1aqvZug/rPYEN73D6SdPaVgcgqxQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddugdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtgfesthhqredttd erjeenucfhrhhomhepfdfrrghulhcuhgdrucftrghnkhhinhdfuceohhgvlhhlohesphgr uhhlfihrrghnkhhinhdrtghomheqnecukfhppeduvddtrddvvddruddurddvudehnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphifrhessgih uggrshgvihhnrdgtohhm X-ME-Proxy: Received: from localhost (unknown [120.22.11.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 310763060CBE for ; Wed, 22 Jan 2020 22:52:55 -0500 (EST) User-agent: mu4e 1.2.0; emacs 27.0.60 From: "Paul W. Rankin" To: bug-gnu-emacs@gnu.org Subject: format-time-string ignores user's preferred locale Date: Thu, 23 Jan 2020 13:48:16 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.147.123.25 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Calling function (format-time-string "%x") will output incorrect time string, ignoring user's preferred locale. * Steps to reproduce: 1. ensure locale is correct with M-x getenv RET LANG RET -> en_AU.UTF-8 2. M-: (format-time-string "%x") RET -> "01/23/20" 3. repeat for env LC_TIME * Expected results: The format for %x as per the docs: %x is the locale=E2=80=99s "preferred" date format. en_AU locale's "preferred" date format should be DD/MM/YYYY: "23/01/2020" i.e. the same as output from shell: $ locale LANG=3D"en_AU.UTF-8" LC_COLLATE=3D"en_AU.UTF-8" LC_CTYPE=3D"en_AU.UTF-8" LC_MESSAGES=3D"en_AU.UTF-8" LC_MONETARY=3D"en_AU.UTF-8" LC_NUMERIC=3D"en_AU.UTF-8" LC_TIME=3D"en_AU.UTF-8" LC_ALL=3D $ date +%x 23/01/2020 * Actual results: "01/23/20" GNU Emacs 27.0.60 (build 1, x86_64-apple-darwin19.2.0, NS appkit-1894.20 Version 10.15.2 (Build 19C57)) of 2020-01-18 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 00:56:40 2020 Received: (at submit) by debbugs.gnu.org; 23 Jan 2020 05:56:40 +0000 Received: from localhost ([127.0.0.1]:51621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuVTr-0000BN-Og for submit@debbugs.gnu.org; Thu, 23 Jan 2020 00:56:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:50603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuVTp-0000BE-Aw for submit@debbugs.gnu.org; Thu, 23 Jan 2020 00:56:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54319) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuVTo-0000zF-8h for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 00:56:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iuVTo-0005Fd-43; Thu, 23 Jan 2020 00:56:36 -0500 Received: from [109.253.160.25] (port=38081 helo=[10.131.127.230]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1iuVTm-0007lM-02; Thu, 23 Jan 2020 00:56:35 -0500 Date: Thu, 23 Jan 2020 07:56:29 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: bug#39248: format-time-string ignores user's preferred locale To: bug-gnu-emacs@gnu.org, "Paul W. Rankin" , 39248@debbugs.gnu.org From: Eli Zaretskii Message-ID: <4A6A9AB3-2B38-4273-89F5-F3AF633C9636@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On January 23, 2020 5:48:16 AM GMT+02:00, "Paul W=2E Rankin" wrote: > Calling function (format-time-string "%x") will output incorrect time > string, ignoring user's preferred locale=2E >=20 > * Steps to reproduce: >=20 > 1=2E ensure locale is correct with M-x getenv RET LANG RET > -> en_AU=2EUTF-8 > 2=2E M-: (format-time-string "%x") RET > -> "01/23/20" > 3=2E repeat for env LC_TIME >=20 > * Expected results: >=20 > The format for %x as per the docs: > %x is the locale=E2=80=99s "preferred" date format=2E What is your value of system-time-locale? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 01:44:25 2020 Received: (at submit) by debbugs.gnu.org; 23 Jan 2020 06:44:25 +0000 Received: from localhost ([127.0.0.1]:51646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuWE5-0001kc-IS for submit@debbugs.gnu.org; Thu, 23 Jan 2020 01:44:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:53462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuWE4-0001kV-5d for submit@debbugs.gnu.org; Thu, 23 Jan 2020 01:44:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54456) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuWE2-0007PO-P8 for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 01:44:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuWE1-00062r-OR for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 01:44:22 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:50563) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuWE1-0005dJ-7Q; Thu, 23 Jan 2020 01:44:21 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B9DAE3C5; Thu, 23 Jan 2020 01:44:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 23 Jan 2020 01:44:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= mg/yBOIex70ZNQmy6TXQ4eM2ZIN0mP+7ddfy2FmSUTE=; b=hv9ZEHgTUZdRgLnx jNGr+LlOnr0S0kAzDMWV4a16a0nk5eHyiqbl5dBXx35Q2i+VGJ9dwyuBKOE5ZF0o VlaVW3SZGjOjnddt4m7vvK9JqVJbvGaOrMnMRbUNj4YBxEdcHOsx4Drd9ldZUu8T s7Yu13crQT2LgXNAPA6EF7V+mRYN6neX2s1xDtmwY4OVD7kbs6qXm/o1x7hoGSpY cvk2Yh5to3jsuYqny4AXRg4zddutVRW7KdnfbdmaKepNLJonDxMS6wmHaoFLvImf dSXbr25hiOzyT98IV7iSUA3sZ1fSsVPV3P0ZkW1R+MxzBxe/MkB4UlzKknQU3JuT MuwL2A== 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=mg/yBOIex70ZNQmy6TXQ4eM2ZIN0mP+7ddfy2FmSU TE=; b=aTBT45loYTOL85JfeMvBTehULTNuDR26PkGylHo1LeDK0Wi6rYhJx78PQ +NqLbFnR9x9+2AEtzc/NFQwnXVhJ5rwfayc0oaXoSzakziw5BDioJPxZ6Ddb3oj8 Uc5AoFoX44qqhLC7FyV199GXiQNa7pE6TqwPq0opnekbFc+np6hkv0v3Z0/IxnLc ePltdR+LA5VuEY+Fxsg5N29Uzhp7Lvrm/TePYZdmzshnYzkyF1zc2/qxJe/izF74 Gs+AJeYqWYv0ZteNFWzjfdkHt3z9t81SkYIIEvU1agRZ8kb5ap/Ba2dSMY+L+JI2 JJh1GxJyxwxMCGpDk4mFtFIG56K/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddugdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffujgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpedfrfgruhhl ucghrdcutfgrnhhkihhnfdcuoehhvghllhhosehprghulhifrhgrnhhkihhnrdgtohhmqe enucfkphepuddvtddrvddvrdduuddrvdduheenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehhvghllhhosehprghulhifrhgrnhhkihhnrdgtoh hm X-ME-Proxy: Received: from localhost (unknown [120.22.11.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D5A1328005C; Thu, 23 Jan 2020 01:44:16 -0500 (EST) References: <4A6A9AB3-2B38-4273-89F5-F3AF633C9636@gnu.org> User-agent: mu4e 1.2.0; emacs 27.0.60 From: "Paul W. Rankin" To: Eli Zaretskii Subject: Re: bug#39248: format-time-string ignores user's preferred locale In-reply-to: <4A6A9AB3-2B38-4273-89F5-F3AF633C9636@gnu.org> Date: Thu, 23 Jan 2020 16:44:11 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.147.123.19 X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: 39248@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) On Thu, Jan 23 2020, Eli Zaretskii wrote: > > What is your value of system-time-locale? system-time-locale -> nil So, this works: (setq system-time-locale (getenv "LANG")) (format-time-string "%x") -> "23/01/2020" But in the Elisp manual: -- Variable: system-time-locale This variable specifies the locale to use for formatting time values. Changing the locale can cause messages to appear according to the conventions of a different language. If the variable is =E2=80=98nil=E2=80=99, the locale is specified by environment variable= s in the usual POSIX fashion. So the issue appears to be instead that ^this doesn't seem to be happening... From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 03:38:51 2020 Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 08:38:51 +0000 Received: from localhost ([127.0.0.1]:51790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuY0p-0004XL-4U for submit@debbugs.gnu.org; Thu, 23 Jan 2020 03:38:51 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuY0n-0004X7-6c for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 03:38:50 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D518E16006A; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id aM-bAPxBRzcJ; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F33D160081; Thu, 23 Jan 2020 00:38:42 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rRvkd9Bz3nCe; Thu, 23 Jan 2020 00:38:42 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E5FE416006A; Thu, 23 Jan 2020 00:38:41 -0800 (PST) To: "Paul W. Rankin" From: Paul Eggert Subject: Re: format-time-string ignores user's preferred locale Organization: UCLA Computer Science Department Message-ID: Date: Thu, 23 Jan 2020 00:38:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Thanks for the bug report. I don't observe the problem on GNU/Linux; for example, the following shell command: LC_ALL=en_AU.utf8 emacs -Q -batch -eval '(message "%s" (format-time-string "%x"))' outputs "23/01/20", which is the same thing that the shell command "LC_ALL=en_AU.utf8 date +%x" outputs. I don't have easy access to macOS so I'll need your help to debug this. I suggest that you build Emacs with debug symbols and with optimization off (e.g., "make clean; make CFLAGS='-g3 -O0'"), and then run it under a debugger, and plant a breakpoint on the nstrftime function and then single-step and see what goes wrong. Something like this: $ make clean $ make CFLAGS='-g3 -O0' $ gdb src/emacs (gdb) b nstrftime (gdb) r -Q -batch -eval '(message "%s" (format-time-string "%x"))' (gdb) n (gdb) n ... This will help us see whether the bug is in Emacs or in the underlying strftime function. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 08:12:56 2020 Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 13:12:56 +0000 Received: from localhost ([127.0.0.1]:51963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iucI4-0000EI-J0 for submit@debbugs.gnu.org; Thu, 23 Jan 2020 08:12:56 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:59577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iucI2-0000E3-Pw for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 08:12:55 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E817C489; Thu, 23 Jan 2020 08:12:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 23 Jan 2020 08:12:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=8 FfsPSv3/UYng7XZifrYhsF6GdBWtlmXjZXRieTNM74=; b=Xe/0++SbjeF08J9k+ gkB65iVtEz+HFOSVG5hvH9RkBlUXGmUed+KL9BRyjs9mVeJhE2TFJYq7wki3o9rl a9weJr+fAEHg9bvWu/uofMTVKOkl9Vs/20FtstIMUVtSL1tKb0YCIVCLSmXL4QLW 1gmnT3AJ55zCPleNe22jevfX9fZ/x2/zu07yNu/H2QawOjERV1toQWUAYxsqN/W2 OWYewAgeNw0Fa6chsRW4Q+jv4ouK82A05vzJdhwo/3nEnKqQw8HMFgCo/H0PvXFM 4ZIdDDbDFz0sAVf5x+i6qg3D6N5UfRvWZLXRhLzwjRo0PhwowCrjLJ+5Z/Mf6gDE WsYiQ== 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=8FfsPSv3/UYng7XZifrYhsF6GdBWtlmXjZXRieTNM 74=; b=D6TgV9KYtQ8m2f8yI2MGo7kFGfwQaq4DREN8/irEixN0V1HP9hXqvo1b9 D4tsSoxyTRE9mq50exCXVgQ7Aw33JXby337XlPGu9d8WNVXNzY95hMtoi2cjVgnw XgFMNXWYRRMl8uoLudyHgwmQf67ZJaz+BkctCWJfSXNebCj0Vwjv7ir+uquVuBn7 GmUL8yWCxpQMCmlNy1x0tWCUwwjadtmGLUVvmknhBEcKPWQFiaeLjlCD98/WmGkD NoUhthcSL1fHtwOFDc2fZD2eHczhk21cULpMXbW0jN/ay0TOIR0rMmV+pf8bjV2Q JjmD+ju64u+5fFzJHAPd/CDeCfiDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddvgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcu hgdrucftrghnkhhinhcuoehhvghllhhosehprghulhifrhgrnhhkihhnrdgtohhmqeenuc ffohhmrghinhepvghmrggtshdrrghpphenucfkphepuddvtddrvddvrdduuddrvdduheen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhvghllh hosehprghulhifrhgrnhhkihhnrdgtohhm X-ME-Proxy: Received: from [172.20.10.3] (unknown [120.22.11.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 8DE1D3060ACE; Thu, 23 Jan 2020 08:12:44 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: format-time-string ignores user's preferred locale From: Paul W. Rankin In-Reply-To: Date: Thu, 23 Jan 2020 23:12:39 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> References: To: Paul Eggert X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Thanks for looking into this for me. > On 23 Jan 2020, at 6:38 pm, Paul Eggert wrote: >=20 > Thanks for the bug report. I don't observe the problem on GNU/Linux; = for example, the following shell command: >=20 > LC_ALL=3Den_AU.utf8 emacs -Q -batch -eval '(message "%s" = (format-time-string "%x"))' This outputs "01/23/20" for me. But I think this is because "utf8" vs = "utf-8", e.g. LC_ALL=3Den_au.utf-8 emacs -Q -batch -eval '(message "%s" = (format-time-string "%x"))' -> 23/01/2020 Which would indicate that macOS only recognises "utf-8" not "utf8". LC_ALL=3Den_AU.utf8 date +%x -> 01/23/20 LC_ALL=3Den_AU.utf-8 date +%x -> 23/01/2020 I should note though that the issue only presents from Emacs.app i.e. = when launched from Finder. Even when launching Emacs.app via /Applications/Emacs.app/Contents/MacOS/Emacs -Q I can get the correct date. It's solely when the app is launched from Finder i.e. outside the shell. = AFAIK this means there's no way for me to launch Emacs.app outside of = the shell with the -Q flag and so I moved my init files out of the way = for a clean launch and reproduced that way. I've also reproduced on Emacs.app versions 24 and 25. (It's actually an = issue that has bothered me for years.) > I suggest that you build Emacs with debug symbols and with = optimization off (e.g., "make clean; make CFLAGS=3D'-g3 -O0'"), and then = run it under a debugger, and plant a breakpoint on the nstrftime = function and then single-step and see what goes wrong. Something like = this: >=20 > $ make clean > $ make CFLAGS=3D'-g3 -O0' > $ gdb src/emacs > (gdb) b nstrftime > (gdb) r -Q -batch -eval '(message "%s" (format-time-string "%x"))' > (gdb) n > (gdb) n > ... I installed gdb and followed these steps, but I get a codesigning error; = apparently in order to function on macOS, gdb requires some = "code-signing" steps that are beyond my competency level. Is there another way to test the strftime function? Or, given that the issue is isolated to Emacs.app when launched outside = of the shell environment, does that narrow it down at all? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 09:19:13 2020 Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 14:19:13 +0000 Received: from localhost ([127.0.0.1]:52018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iudKD-0007ng-1A for submit@debbugs.gnu.org; Thu, 23 Jan 2020 09:19:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iudKB-0007nU-I7 for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 09:19:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iudK5-0000Vg-Rj; Thu, 23 Jan 2020 09:19:06 -0500 Received: from [176.228.60.248] (port=1243 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iudK4-0004Aw-NX; Thu, 23 Jan 2020 09:19:05 -0500 Date: Thu, 23 Jan 2020 16:19:21 +0200 Message-Id: <83lfpytfva.fsf@gnu.org> From: Eli Zaretskii To: "Paul W. Rankin" In-reply-to: (hello@paulwrankin.com) Subject: Re: bug#39248: format-time-string ignores user's preferred locale References: <4A6A9AB3-2B38-4273-89F5-F3AF633C9636@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: "Paul W. Rankin" > Cc: bug-gnu-emacs@gnu.org, 39248@debbugs.gnu.org > Date: Thu, 23 Jan 2020 16:44:11 +1000 > > So, this works: > > (setq system-time-locale (getenv "LANG")) > (format-time-string "%x") > -> "23/01/2020" > > But in the Elisp manual: > > -- Variable: system-time-locale > This variable specifies the locale to use for formatting time > values. Changing the locale can cause messages to appear according > to the conventions of a different language. If the variable is > ‘nil’, the locale is specified by environment variables in the > usual POSIX fashion. > > So the issue appears to be instead that ^this doesn't seem to be > happening... No, having system-time-locale as nil is perfectly normal. I asked the question so we'd know whether that variable is part of the issue. It doesn't seem to be, AFAIU. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 13:05:41 2020 Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 18:05:41 +0000 Received: from localhost ([127.0.0.1]:53135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iugrN-00073x-CP for submit@debbugs.gnu.org; Thu, 23 Jan 2020 13:05:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iugrJ-00073W-Gv for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 13:05:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iugrD-0006Xb-Ul; Thu, 23 Jan 2020 13:05:31 -0500 Received: from [176.228.60.248] (port=3098 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iugrB-00031J-NH; Thu, 23 Jan 2020 13:05:30 -0500 Date: Thu, 23 Jan 2020 20:05:22 +0200 Message-Id: <837e1it5el.fsf@gnu.org> From: Eli Zaretskii To: Paul W. Rankin In-reply-to: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> (message from Paul W. Rankin on Thu, 23 Jan 2020 23:12:39 +1000) Subject: Re: bug#39248: format-time-string ignores user's preferred locale References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Paul W. Rankin > Date: Thu, 23 Jan 2020 23:12:39 +1000 > Cc: 39248@debbugs.gnu.org > > Or, given that the issue is isolated to Emacs.app when launched outside of the shell environment, does that narrow it down at all? I guess that's yet another manifestation of the macOS deviant behavior of Emacs.app, whereby it doesn't inherit environment variables from the shell. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 17:05:29 2020 Received: (at 39248) by debbugs.gnu.org; 23 Jan 2020 22:05:29 +0000 Received: from localhost ([127.0.0.1]:53281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iukbR-0006NH-IO for submit@debbugs.gnu.org; Thu, 23 Jan 2020 17:05:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iukbQ-0006N3-De for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 17:05:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iukbK-00038i-Qm; Thu, 23 Jan 2020 17:05:22 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1iukb0-0007qN-77; Thu, 23 Jan 2020 17:05:05 -0500 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#39248: format-time-string ignores user's preferred locale References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> X-Spook: CIKR Nerve agent brigand satellite imagery MD5 H5N1 Pork X-Ran: j^%_!8%Ed|#npH<,?=EkoU:n0q(DQG3,F5t_Rk5u$PZBzro}Ii2Ik:OdUY[xP&#PFGJ3ec X-Hue: brightred X-Attribution: GM Date: Thu, 23 Jan 2020 17:04:59 -0500 In-Reply-To: <837e1it5el.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Jan 2020 20:05:22 +0200") Message-ID: <3ov9p1j0c4.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org, "Paul W. Rankin" , eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii wrote: >> Or, given that the issue is isolated to Emacs.app when launched >> outside of the shell environment, does that narrow it down at all? > > I guess that's yet another manifestation of the macOS deviant behavior > of Emacs.app, whereby it doesn't inherit environment variables from > the shell. Rather, that macOS does not set up environment for applications launched from Finder. I don't think that is an Emacs problem. On GNU/Linux, my window manager runss from a login shell and so has a correct environment for applications it launches. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 23 22:17:24 2020 Received: (at 39248) by debbugs.gnu.org; 24 Jan 2020 03:17:24 +0000 Received: from localhost ([127.0.0.1]:53401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iupTI-0001AI-99 for submit@debbugs.gnu.org; Thu, 23 Jan 2020 22:17:24 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:40721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iupTG-0001A5-GE for 39248@debbugs.gnu.org; Thu, 23 Jan 2020 22:17:22 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id AA0476FE; Thu, 23 Jan 2020 22:17:16 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 23 Jan 2020 22:17:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=I N2oMNXx/spDj1wtq9njjjiPdXKIyqQl2VlHzat1/SQ=; b=aqefdg6jKH5YjEtQU hgXsi8vIm3ZedxLhBHz4GIRGxy7qrNSlcm4fNQ+3T1fmxozNEWxdET0RFsvSWArm Y/nLnAdj6jc7kO1xii0L/Fn1oh/vXcBs0BTJ1K8YqLpSbB3qYR/1ncVKt/O//S2/ s8jSOnKM7Dn+r811ipv5esVbpR/Shw0Tr1sFMHsyanp3VV8edJ09MFKXkSaQEqkr IuWEMQ5TB1j3xtOjfbYqzBUtE0fYpUJnXs66Bj1eDdDwEjwiPmofrRhgPUPGnNr6 QN3xThZbFp5jXeGGE1njl4NbnU9hhyY6n//SsQxbLHfdmG+fRciGXa/Px1WSiQWL zdQFw== 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=IN2oMNXx/spDj1wtq9njjjiPdXKIyqQl2VlHzat1/ SQ=; b=eHJlk3thUzyUX8c3BnV/onkFVVqhYjwhOeqRQBMi8WLPHTzmiL/7pKF7n f92LSlxVvRDJou7lj8HyAmMGNxp+Dd4w/lQiBbSIkkyzX+INN1bELW1xiB743H50 EgppehHYSV6+qwfSNPmMrL/UPotq40WT0eiA3MvrhCneePOV1i7hIlRQyGEehrsK +/KjKw5+qa3FAK9qzBfwR5HKl17RRnWqvb6ZjVJrDw+l3hPU8hSVVkYPeqkQvhCc 55MueLm9QRVXQs6jg6BoRGZXK9FshLazQd/WGr3QvmY8toQS4T0R+cJ6aWwNXwDL oxGBqxHwocPhnciWpRSWcbqSna6+w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvdefgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpedfrfgruhhl ucghrdcutfgrnhhkihhnfdcuoehhvghllhhosehprghulhifrhgrnhhkihhnrdgtohhmqe enucfkphepuddvtddrvddvrdeijedrfeeknecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhephhgvlhhlohesphgruhhlfihrrghnkhhinhdrtghomh X-ME-Proxy: Received: from [172.20.10.3] (unknown [120.22.67.38]) by mail.messagingengine.com (Postfix) with ESMTPA id 8AE8F3060981; Thu, 23 Jan 2020 22:17:14 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: bug#39248: format-time-string ignores user's preferred locale From: "Paul W. Rankin" In-Reply-To: <3ov9p1j0c4.fsf@fencepost.gnu.org> Date: Fri, 24 Jan 2020 13:17:11 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> To: Glenn Morris X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org, Eli Zaretskii , eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > On 24 Jan 2020, at 8:04 am, Glenn Morris wrote: >=20 > Eli Zaretskii wrote: >=20 >>> Or, given that the issue is isolated to Emacs.app when launched >>> outside of the shell environment, does that narrow it down at all? >>=20 >> I guess that's yet another manifestation of the macOS deviant = behavior >> of Emacs.app, whereby it doesn't inherit environment variables from >> the shell. >=20 > Rather, that macOS does not set up environment for applications > launched from Finder. I don't think that is an Emacs problem. >=20 > On GNU/Linux, my window manager runss from a login shell and so has a > correct environment for applications it launches. It would probably be weird for macOS to ask the shell for environment = variables when launched from the Finder. The relationship doesn't appear = as the same as on GNU/Linux. But OS-preferences aside, Emacs.app in macOS does correctly set the = process-environment variable though, so these environment variables = (including LANG) are available to Emacs, e.g. USER, TMPDIR, SHELL are a = few that seem to be picked up without issue, so shouldn't the same be = true of LANG?= From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 24 02:35:33 2020 Received: (at 39248) by debbugs.gnu.org; 24 Jan 2020 07:35:34 +0000 Received: from localhost ([127.0.0.1]:53436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iutV7-0007VR-J4 for submit@debbugs.gnu.org; Fri, 24 Jan 2020 02:35:33 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iutV4-0007VC-QJ for 39248@debbugs.gnu.org; Fri, 24 Jan 2020 02:35:32 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 35149160071; Thu, 23 Jan 2020 23:35:25 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id F_5YkA2I1cFZ; Thu, 23 Jan 2020 23:35:24 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 24D0D160086; Thu, 23 Jan 2020 23:35:24 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Bv1sQcm6Z3rS; Thu, 23 Jan 2020 23:35:24 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E4F7B160071; Thu, 23 Jan 2020 23:35:23 -0800 (PST) Subject: Re: bug#39248: format-time-string ignores user's preferred locale To: "Paul W. Rankin" , Glenn Morris References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Thu, 23 Jan 2020 23:35:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------9B8BB86E35BCD34A1C2EEB38" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39248 Cc: 39248@debbugs.gnu.org, Eli Zaretskii , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------9B8BB86E35BCD34A1C2EEB38 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/23/20 7:17 PM, Paul W. Rankin wrote: > The relationship doesn't appear as the same as on GNU/Linux. It's similar, in that one can launch apps in various ways (e.g., via Gnome) without involving shell environment variables. Looking into this a bit more, I see that Alan Third wrote a fix for this problem (which is apparently quite a zoo in macOS, as Apple keeps changing how to set environment variables!) into Emacs in master commit 2016-02-11T02:26:50Z!alan@idiocy.org. However, Emacs currently sets the LANG environment variable in ns_init_locale *after* Emacs uses LANG to set the LC_TIME locale, which is not what is wanted here. So, please try the attached patch to master. You'll need to grab the latest master as I recently installed a locale cleanup patch while looking into this mess. If this patch doesn't work for you, perhaps you can write a small variant of it that does work. --------------9B8BB86E35BCD34A1C2EEB38 Content-Type: text/x-patch; charset=UTF-8; name="0001-Propagate-NSLocale-into-Emacs-better.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Propagate-NSLocale-into-Emacs-better.patch" >From 82821adea730dab5a42d24e49675ade1c2f5c1f3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 23 Jan 2020 23:16:47 -0800 Subject: [PATCH] Propagate NSLocale into Emacs better * src/emacs.c (main): Call ns_init_locale before using the environment variable that ns_init_locale sets up (Bug#39248). --- src/emacs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 4b5d00a0e8..c170333e60 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1242,6 +1242,9 @@ main (int argc, char **argv) char *lc_all = getenv ("LC_ALL"); if (! (lc_all && strcmp (lc_all, "C") == 0)) { + #ifdef HAVE_NS + ns_init_locale (); + #endif setlocale (LC_ALL, ""); fixup_locale (); } @@ -1610,10 +1613,6 @@ main (int argc, char **argv) #ifdef HAVE_NS ns_pool = ns_alloc_autorelease_pool (); -#ifdef NS_IMPL_GNUSTEP - /* GNUstep stupidly resets our locale settings after we made them. */ - fixup_locale (); -#endif if (!noninteractive) { @@ -1724,11 +1723,6 @@ main (int argc, char **argv) globals_of_gfilenotify (); #endif -#ifdef HAVE_NS - /* Initialize the locale from user defaults. */ - ns_init_locale (); -#endif - /* Initialize and GC-protect Vinitial_environment and Vprocess_environment before set_initial_environment fills them in. */ -- 2.24.1 --------------9B8BB86E35BCD34A1C2EEB38-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 04:36:18 2020 Received: (at 39248) by debbugs.gnu.org; 25 Jan 2020 09:36:18 +0000 Received: from localhost ([127.0.0.1]:54967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivHrW-00085X-6p for submit@debbugs.gnu.org; Sat, 25 Jan 2020 04:36:18 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivHrT-00085J-Ng for 39248@debbugs.gnu.org; Sat, 25 Jan 2020 04:36:16 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 9556C21D51; Sat, 25 Jan 2020 04:36:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 25 Jan 2020 04:36:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm1; bh=ys1KVicP5y0CWlrW+S5kKW9sbP CtTSr0t26kR0/jYzs=; b=CyG4ICKFFhK0t3e1Vr2y+bMyo5ooIUDLEvzm9LLCFn q+qdCyXRZTukyBOUgzwTKH2gzZP3Ftaf2uUEN+e+mNE5vSr1pzTzv6v395b58Jx4 vAahiqt7810gi9x1FhTsigJedl8KAvBAufz8cG+DOso12Ja/nnFQMY4b/drJf4kW tjg0tz8NcMPstktUZTO9eUOMVKDPfPi5gZcWMjhiASW4UWHXBdnEg65Fbwl8Mft5 kYoF8geUBNBigC4/vC3JBekDraxj329u8lnK0fqWYklG6Yd8SYcAzszB2EUg7G8/ 4NWHFpvqwwp3e1NFLcn9yG93Cb98o0Vu8BvqebkPoHIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=ys1KVi cP5y0CWlrW+S5kKW9sbPCtTSr0t26kR0/jYzs=; b=qbtX7Zm9aLBYcARiOdalBp b8ZiCgqXxDwtY0HD+6ub1cTw7P+9wzkGpgwiy4QYkvQT3jiACBLigaUf91LlipcC tzGLjQLxlgiPUvYR4dIP6CCbpqvZZwlzNnuJ4nHyEQNa8QQvBIFNA1n1Eg8560c/ Mn2xeisIMvBHHLQKaesUesGv7vFw+mJGpWzaWKmKe7k0m5q+6JTApOBfy+V5q6ln 9Oq0uKt5CRB+1jXsQ3/JZmIs302pxiSzavrtyVPLZsXqIYEe7JoND1nE762sHE71 WanJa2DNTzmRpMkyAQ+Xz1dgMy0t3pwzoh03DpLykzbK33Sgz+19oarqMTWtV/zA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvdejgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffujgffkfggtgesthdtredttdertdenucfhrhhomhepfdfrrghulhcu hgdrucftrghnkhhinhdfuceohhgvlhhlohesphgruhhlfihrrghnkhhinhdrtghomheqne cukfhppeduvddtrddvvddrieelrddvvdegnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhephhgvlhhlohesphgruhhlfihrrghnkhhinhdrtghomh X-ME-Proxy: Received: from localhost (unknown [120.22.69.224]) by mail.messagingengine.com (Postfix) with ESMTPA id 898E830654C8; Sat, 25 Jan 2020 04:36:09 -0500 (EST) References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> User-agent: mu4e 1.2.0; emacs 28.0.50 From: "Paul W. Rankin" To: Paul Eggert Subject: Re: bug#39248: format-time-string ignores user's preferred locale In-reply-to: Date: Sat, 25 Jan 2020 19:36:03 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: Glenn Morris , Eli Zaretskii , Alan Third , 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri, Jan 24 2020, Paul Eggert wrote: > However, Emacs currently sets the LANG environment variable in > ns_init_locale *after* Emacs uses LANG to set the LC_TIME locale, > which is not what is wanted here. So, please try the attached patch to > master. Thank you, this patch works; Emacs.app launched from Finder on macOS now gives: (format-time-string "%x") "25/01/2020" GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.2.0, NS appkit-1894.20 Version 10.15.2 (Build 19C57)) of 2020-01-25 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 06:18:15 2020 Received: (at 39248) by debbugs.gnu.org; 25 Jan 2020 11:18:15 +0000 Received: from localhost ([127.0.0.1]:55010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJSB-00020C-LQ for submit@debbugs.gnu.org; Sat, 25 Jan 2020 06:18:15 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:42157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJS9-0001zz-W1 for 39248@debbugs.gnu.org; Sat, 25 Jan 2020 06:18:14 -0500 Received: by mail-wr1-f47.google.com with SMTP id q6so5132374wro.9 for <39248@debbugs.gnu.org>; Sat, 25 Jan 2020 03:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=esPFvhW1a6+q+HE/loWHMFSasLWcVYdXB1oes3fB2OQ=; b=embkdjL8K4Eo7LNG5rrqLaX44cWsaqpaRK/LUjxVW15GUoheYGI8lpcJWiiPpnFfS9 9T59TV4CR/xPLL84OlzZx/Xo1NZfc9raJKf8rK0koq3BVvzXSK14byL4M2TyPoTpS5Km xVjmmESCW4Nrepkex28e2PwS1J9amBBT5wLkBDNUsVPw/lcj3KHzhC0hvCxdw7TmU/ot gxsS8G4UI8/fJ9Orvzr2PHQLQn23cs9xmE6hgqIQYMxzif2g0NV2C81MOjMu+lMrjKY+ C9gNsB11lYMEd+6FRoLBtIzYQLa5ZqOGPo0xgvjRFTQWfQTkyvHVs4Rms1hZp4gBaSMe fr5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=esPFvhW1a6+q+HE/loWHMFSasLWcVYdXB1oes3fB2OQ=; b=rmM985dvMqJ9+0MYXWxDJeb9PYy0phIAcp3qurTRenreL1suxxU18yAV+Q5PjLwf3t TEMuKZLbqculMn3ajWok95joFgh/eA/KeTwr2J64zJmpBH4nnRMHji48cZ55pI0EBnxA HlvrV1qAhtZkvwLhmSS1Hz3T3PZqRJLX0W0/pFys2sB9ykSYvbEuLg0GqLxfF9wVcw/D IdBBfR1Cbtmi6LLlI/gpZLiTqHdisxCmgcKIWbRvKZ2SUTe7Z9F4znDHhecbdQle+Hcf CcHedonC6epP12M2LObCTmWdoCLbBgx8lnBO8RXJh5kq6z5cWmNUtNYIaCmn3ES2MCV9 /uCQ== X-Gm-Message-State: APjAAAUAD9q4G5uCtoQ6E4FJq1m3yp9h4a1mo+SFawPrDsumqIMPHObK +zxbjng7kDgd+TvZKJqHlVY= X-Google-Smtp-Source: APXvYqzu1STaAYNrx3R2u+zO8y3JTX2NuU5IzOhmUhMQOBEw0MBrpR7ru7gFUKvPFYgCTcPJ3FdZyA== X-Received: by 2002:adf:ffc5:: with SMTP id x5mr10290011wrs.92.1579951088115; Sat, 25 Jan 2020 03:18:08 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c952-042c-63d5-ffbd.holly.idiocy.org. [2001:8b0:3f8:8129:c952:42c:63d5:ffbd]) by smtp.gmail.com with ESMTPSA id 18sm9861516wmf.1.2020.01.25.03.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2020 03:18:07 -0800 (PST) Date: Sat, 25 Jan 2020 11:18:05 +0000 From: Alan Third To: Paul Eggert Subject: Re: bug#39248: format-time-string ignores user's preferred locale Message-ID: <20200125111805.GA7816@breton.holly.idiocy.org> References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39248 Cc: Glenn Morris , "Paul W. Rankin" , Eli Zaretskii , 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Jan 23, 2020 at 11:35:20PM -0800, Paul Eggert wrote: > #ifdef HAVE_NS > ns_pool = ns_alloc_autorelease_pool (); > -#ifdef NS_IMPL_GNUSTEP > - /* GNUstep stupidly resets our locale settings after we made them. */ > - fixup_locale (); > -#endif Hi Paul, this LGTM, but I’m just curious if you’re sure we don’t need that code above any more? Thanks! -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 06:42:33 2020 Received: (at 39248) by debbugs.gnu.org; 25 Jan 2020 11:42:33 +0000 Received: from localhost ([127.0.0.1]:55034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJpg-0002hZ-Qt for submit@debbugs.gnu.org; Sat, 25 Jan 2020 06:42:33 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJpe-0002hM-OG for 39248@debbugs.gnu.org; Sat, 25 Jan 2020 06:42:31 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 946BA21FDF; Sat, 25 Jan 2020 06:42:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 25 Jan 2020 06:42:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=Y XdXaejKEqr602L9mgCMcjWevym2ptnKa8RYCXJZ54g=; b=IMYLn5UenFU78iuqB JTqLfN95wgFZiYnffdamOn6G6vugDWmTHXvF8sKzchTNzn9CZ2kW4SZ/gBTOld+4 VcVeF8xrAs4jGuwc05jrUjXoH/uGuTYoANfIHOHrhcnPr3lai9bQS54LoMpQhtCu yngbqH4g2Gx7rVpIXrF4ygC/sPs8NGT/oFDcPqCbplWCSJYsfu2rfhRdajUC3fxC PnlI4wb60d/YObfYoYjmwceNfH263fGaxAHOam8qA+bsAp4mu3rMHkCus/apP3D7 TwcbwQSeN+IzMklsSVZo6rRg3k9+lk7t0VTmuXWc/VrwCi2mtgkPBQbvof4Wroog Ed3Ag== 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=YXdXaejKEqr602L9mgCMcjWevym2ptnKa8RYCXJZ5 4g=; b=qZcJtAjfx9A1Td1czedydPUl3Ogq3ekoSEzLHqwACAqLQFwUJ7NkagMLq CyZ3hwwUsYdqvPmzyrpKEnv2YlJ9PP5dYHTjO3Mcvk+WRTiSQNIaE9A4ukS1xHxm JrssHsEFBp3ROgOuJXXEiYl6vYgr00g5A7vq1Md+M5MWTMBDVgiEpbblaeIIbEcU rmMZSdogNaBQLkdbbWC4LvOXE2GP06lHR0qXOAKPTuQyirJFOvzkQuyGoc+5un5V vSZ7qICH7WwFHvfyv6KwQcfT6VPkb4Wdig8gf/I5epsyoIM6cdPj3AomSZhrvPrn 013rhGMss0NS7kPgpw6aC7cK3qbCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvdejgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpedfrfgruhhl ucghrdcutfgrnhhkihhnfdcuoehhvghllhhosehprghulhifrhgrnhhkihhnrdgtohhmqe enucfkphepuddvtddrvddvrdeiledrvddvgeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehhvghllhhosehprghulhifrhgrnhhkihhnrdgtoh hm X-ME-Proxy: Received: from [172.20.10.3] (unknown [120.22.69.224]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BCA33280060; Sat, 25 Jan 2020 06:42:21 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: bug#39248: format-time-string ignores user's preferred locale From: "Paul W. Rankin" In-Reply-To: <20200125111805.GA7816@breton.holly.idiocy.org> Date: Sat, 25 Jan 2020 21:42:16 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> <20200125111805.GA7816@breton.holly.idiocy.org> To: Alan Third X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39248 Cc: Glenn Morris , Eli Zaretskii , Paul Eggert , 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > On 25 Jan 2020, at 9:18 pm, Alan Third wrote: >=20 > On Thu, Jan 23, 2020 at 11:35:20PM -0800, Paul Eggert wrote: >> #ifdef HAVE_NS >> ns_pool =3D ns_alloc_autorelease_pool (); >> -#ifdef NS_IMPL_GNUSTEP >> - /* GNUstep stupidly resets our locale settings after we made them. = */ >> - fixup_locale (); >> -#endif >=20 > Hi Paul, this LGTM, but I=E2=80=99m just curious if you=E2=80=99re = sure we don=E2=80=99t need > that code above any more? I have no idea sorry. Applying the patch and compiling was a new = experience for me. If someone held a gun to my head I wouldn't even be = sure it's C code... Is there anything you'd like me to do with the Emacs.app to check it's = kosher?= From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 25 07:04:00 2020 Received: (at 39248) by debbugs.gnu.org; 25 Jan 2020 12:04:01 +0000 Received: from localhost ([127.0.0.1]:55059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivKAS-0007BX-Ah for submit@debbugs.gnu.org; Sat, 25 Jan 2020 07:04:00 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:54049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivKAP-0007BJ-Th for 39248@debbugs.gnu.org; Sat, 25 Jan 2020 07:03:59 -0500 Received: by mail-wm1-f52.google.com with SMTP id m24so2079991wmc.3 for <39248@debbugs.gnu.org>; Sat, 25 Jan 2020 04:03:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=NTj001+ATDXjvxtPwRkvyrJEd4eqtAPZkrulhV4ld9o=; b=cfUbmwxE4q+92qbyXwOi1e3bkcQiD4WVBai+ceAYOJdIccGfv/mMrQuaPW0qdGAJ5X 6M2AfcGz3Buf9JnLChGlyFwFUwnVHAQm7JTlQOc0rA45uPQ39ZZSUlfAA7G9qcyXsMEz LQM+gubTZwT5lDoQdj1JWsuY2y5QAXi4VecnL9/tyfLRPvcKD9q6llhkrUn8G+RiSgE6 M0jsRy+ATDHXQxqV8QuLxRsKuJNBhJurgdZNx+fdGQL0HmmMbKb0PZ5yvDfUYKwkAtI/ qTF2Fsy3IDLktb/He4ii6/CU7iK9zzZIS/erI19Wy3VgObNwBaYT/g7WDQJXuBjOW1bg dX1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=NTj001+ATDXjvxtPwRkvyrJEd4eqtAPZkrulhV4ld9o=; b=egDJ+dLQbuPmzHJu37FYmhdX/zKznQAaD48YkyRHP1NLj2uiwpUyHnupibvpch/5/N hOfqBas6GG8QX1LjCtkIKnyYFLKwKn2RvvetqnjlTmcA4NCrSWczWSFWmVlADAEL082n IV4KMS30NJ6yo4geAvyN2pi6FxZVuCI57c0eaRqAbnwRd8hf93cwk3arMR5VhkiB4cYi YqJhEMOB9lHJgarsBHzNmUvP4Q8HOdkya9pKh/mqvGQ5FkTsxZDa3lFcDrksUJm/LGel 8LLRP0A9J+/hmqZvbUJQTabT15kNyaa3qfIUuN7wU9N+uVDermyW63ebbiat8J1ASZcd uYkA== X-Gm-Message-State: APjAAAVxel6hbDKrsVNPWyWtKSHFKCJm8IYbVEbQq0TBdrGwzdty8EJS suiwIJuhaCxPU548g2z0jGQ= X-Google-Smtp-Source: APXvYqxP4t6zY1RRRF4Jmdk2tAY8y8PrwEzmfjh2rp8Rj9Bwkouz2F0UI8HCW9f/RYnp2vsB0AU0tQ== X-Received: by 2002:a7b:c218:: with SMTP id x24mr3987822wmi.149.1579953832037; Sat, 25 Jan 2020 04:03:52 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c952-042c-63d5-ffbd.holly.idiocy.org. [2001:8b0:3f8:8129:c952:42c:63d5:ffbd]) by smtp.gmail.com with ESMTPSA id l15sm10910651wrv.39.2020.01.25.04.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2020 04:03:51 -0800 (PST) Date: Sat, 25 Jan 2020 12:03:49 +0000 From: Alan Third To: "Paul W. Rankin" Subject: Re: bug#39248: format-time-string ignores user's preferred locale Message-ID: <20200125120349.GA10529@breton.holly.idiocy.org> References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> <20200125111805.GA7816@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39248 Cc: Glenn Morris , Eli Zaretskii , Paul Eggert , 39248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Sat, Jan 25, 2020 at 09:42:16PM +1000, Paul W. Rankin wrote: > > > On 25 Jan 2020, at 9:18 pm, Alan Third wrote: > > > > On Thu, Jan 23, 2020 at 11:35:20PM -0800, Paul Eggert wrote: > >> #ifdef HAVE_NS > >> ns_pool = ns_alloc_autorelease_pool (); > >> -#ifdef NS_IMPL_GNUSTEP > >> - /* GNUstep stupidly resets our locale settings after we made them. */ > >> - fixup_locale (); > >> -#endif > > > > Hi Paul, this LGTM, but I’m just curious if you’re sure we don’t need > > that code above any more? > > I have no idea sorry. Applying the patch and compiling was a new > experience for me. If someone held a gun to my head I wouldn't even > be sure it's C code... > > Is there anything you'd like me to do with the Emacs.app to check > it's kosher? No, you’re good. I was actually talking to the other Paul who wrote the patch. :) -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 26 03:35:39 2020 Received: (at 39248-done) by debbugs.gnu.org; 26 Jan 2020 08:35:39 +0000 Received: from localhost ([127.0.0.1]:56495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivdON-0004yj-FX for submit@debbugs.gnu.org; Sun, 26 Jan 2020 03:35:39 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivdOM-0004yX-AZ for 39248-done@debbugs.gnu.org; Sun, 26 Jan 2020 03:35:38 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 63D0B16007A; Sun, 26 Jan 2020 00:35:32 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id u8173aB7AKXX; Sun, 26 Jan 2020 00:35:31 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A2F1916007F; Sun, 26 Jan 2020 00:35:31 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EZp1mHSRjDmc; Sun, 26 Jan 2020 00:35:31 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 70AE916007A; Sun, 26 Jan 2020 00:35:31 -0800 (PST) Subject: Re: bug#39248: format-time-string ignores user's preferred locale To: Alan Third References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> <20200125111805.GA7816@breton.holly.idiocy.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 26 Jan 2020 00:35:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200125111805.GA7816@breton.holly.idiocy.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39248-done Cc: Glenn Morris , "Paul W. Rankin" , 39248-done@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/25/20 3:18 AM, Alan Third wrote: > On Thu, Jan 23, 2020 at 11:35:20PM -0800, Paul Eggert wrote: >> #ifdef HAVE_NS >> ns_pool =3D ns_alloc_autorelease_pool (); >> -#ifdef NS_IMPL_GNUSTEP >> - /* GNUstep stupidly resets our locale settings after we made them. = */ >> - fixup_locale (); >> -#endif >=20 > Hi Paul, this LGTM, but I=E2=80=99m just curious if you=E2=80=99re sure= we don=E2=80=99t need > that code above any more? Although I don't use GNUstep and haven't tested the code, as I recall GNU= step=20 initializes itself on its first call (which is why the fixup_locale call = was=20 there, as ns_alloc_autorelease_pool was the first call to GNUstep), and i= f so=20 then we don't need fixup_locale there anymore since we now call fixup_loc= ale=20 earlier, just after calling ns_init_locale which calls NSLocale currentlo= cale=20 should cause GNUstep to initialize itself. If I'm wrong feel free to put that code back in, but in the meantime I in= stalled=20 the patch as-is, as Paul R. reports that it works for him. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 26 05:26:11 2020 Received: (at 39248-done) by debbugs.gnu.org; 26 Jan 2020 10:26:11 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivf7L-0007l1-Kq for submit@debbugs.gnu.org; Sun, 26 Jan 2020 05:26:11 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:43797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivf7J-0007kk-Jy for 39248-done@debbugs.gnu.org; Sun, 26 Jan 2020 05:26:09 -0500 Received: by mail-wr1-f47.google.com with SMTP id d16so7374937wre.10 for <39248-done@debbugs.gnu.org>; Sun, 26 Jan 2020 02:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=OgJA3PL4obda7rnxGCJtlj60WnohfOr2eHvx9VJRw7w=; b=YBNsPJL+YJ7hmI+1WELhSRJP76YXaxJLb8rcFYng7d1fbvSb+7xMf7wjYTGwrYLHmQ 6WvnWjTlYTeEsUvE0GmW10X4MRyZGcHfUsQPrLc5vlbUFF/KP6tAuz7+pCgLrbSJ6aqm DBsjNwCSLC/uNc3GLu9bLB2UaTeC1q1oFlFhI/7F/pz7MOQUBsVm7vgjdXqYJ2YXPi5t cF6h6UDKGeRLyXZTYuyJ+Liof3eKZPmqYIS2g7ulbfBBISYUN8xINb76X9BG/7YUMVNO BQUtKwzr5IfJ6F8hx4LVwg8coI8Nxq+mJc57y+XwjUFx9YN/5SPRJI5C+/9d9Lv1dP4k xmcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=OgJA3PL4obda7rnxGCJtlj60WnohfOr2eHvx9VJRw7w=; b=HEbWADrrAGtdnLMLGqGql7TPWiI0ZCiMPVIkQzqtBjr0O4mLiR22YrbW+kYqsCLkwy eaX+uJIVy6xjqcsXQOLiO4hPo/TOjv5kwX/pJPrMqIeL6YuSijXURu+SZvLLRlgLiCht 1FoEoEDPgT+PT7lk6rwhs3kdS062hexlc9BxUxk7FHlBScwO+0Z/21Zzbk00REkK0x7c rh3Mj1ZZgENGZxlHJl9kE1CtsupnXHibquG7U1fQ5eEvNNxPkFXLX+m4F8BEt2FN5iBw QyLJkU4uOhzEwQI9gmvc5dGnzm+wOg2c30lzZqYsHTL2bkGM99SIt+e9T9vS5IlnFGSY xHEg== X-Gm-Message-State: APjAAAUPFfMQp/JlT5BaVsJFWu9+MREoMjGy/bu1mun0l1jwhBt7PhBA Doy8wbtjZ9tffGiKn7HFLO8= X-Google-Smtp-Source: APXvYqzy38renNgRdILi54G2/5jM0jpsvMhQ6dJNb8s35c48P0z4u0usdbQn1svh2dvfzDkOiGxvTg== X-Received: by 2002:a5d:4b45:: with SMTP id w5mr14403699wrs.224.1580034363680; Sun, 26 Jan 2020 02:26:03 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c952-042c-63d5-ffbd.holly.idiocy.org. [2001:8b0:3f8:8129:c952:42c:63d5:ffbd]) by smtp.gmail.com with ESMTPSA id o1sm15478313wrn.84.2020.01.26.02.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 02:26:02 -0800 (PST) Date: Sun, 26 Jan 2020 10:26:00 +0000 From: Alan Third To: Paul Eggert Subject: Re: bug#39248: format-time-string ignores user's preferred locale Message-ID: <20200126102600.GA31779@breton.holly.idiocy.org> References: <68077D50-2E85-4FB7-92EF-96C636D6DE6E@paulwrankin.com> <837e1it5el.fsf@gnu.org> <3ov9p1j0c4.fsf@fencepost.gnu.org> <20200125111805.GA7816@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39248-done Cc: Glenn Morris , "Paul W. Rankin" , 39248-done@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Sun, Jan 26, 2020 at 12:35:31AM -0800, Paul Eggert wrote: > On 1/25/20 3:18 AM, Alan Third wrote: > > On Thu, Jan 23, 2020 at 11:35:20PM -0800, Paul Eggert wrote: > > > #ifdef HAVE_NS > > > ns_pool = ns_alloc_autorelease_pool (); > > > -#ifdef NS_IMPL_GNUSTEP > > > - /* GNUstep stupidly resets our locale settings after we made them. */ > > > - fixup_locale (); > > > -#endif > > > > Hi Paul, this LGTM, but I’m just curious if you’re sure we don’t need > > that code above any more? > > Although I don't use GNUstep and haven't tested the code, as I recall > GNUstep initializes itself on its first call (which is why the fixup_locale > call was there, as ns_alloc_autorelease_pool was the first call to GNUstep), > and if so then we don't need fixup_locale there anymore since we now call > fixup_locale earlier, just after calling ns_init_locale which calls NSLocale > currentlocale should cause GNUstep to initialize itself. > > If I'm wrong feel free to put that code back in, but in the meantime I > installed the patch as-is, as Paul R. reports that it works for him. No, sounds reasonable. Thanks for the explanation. -- Alan Third From unknown Fri Aug 15 04:04:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Feb 2020 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator