GNU bug report logs - #65908
29.1.50; Emacs 29 regresses on macOS

Previous Next

Package: emacs;

Reported by: Zhang Haijun <ccsmile2008 <at> outlook.com>

Date: Wed, 13 Sep 2023 06:48:02 UTC

Severity: normal

Found in version 29.1.50

Fixed in version 29.2

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: Gregory Heytings <gregory <at> heytings.org>, 65908 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefankangas <at> gmail.com>,
 ccsmile2008 <at> outlook.com
Subject: Re: bug#65908: 29.1.50; Emacs 29 regresses on macOS
Date: Thu, 05 Oct 2023 07:55:55 +0200
Alan Third <alan <at> idiocy.org> writes:

>> which is the output of 'locale' in a terminal, translated to Elisp.
>> With these settings, the slowdown is gone, without changing the code.
>
> So is Emacs run in the terminal with a LANG of something like
> en_GB.UTF-8 slower too? Because iirc my mac's terminal doesn't default
> to 'C' and I don't see anything GUI specific in the test code...
>
> FWIW I don't see any meaningful difference using different locale
> settings on my Debian box, which makes me wonder if there is some
> low-level darwin code that reads the locale from the environment. Any
> idea if it's loading the files or stepping through the defuns that's
> slower, or both?
>
> Long story short: I have no idea what's going on here.

Me neither.  I tried to find something definitive about locales+bundles
Apple's docs, and on the Internet in general, but failed miserably.
What a mess.

Anyway, something is odd here, I think.

When I start 058c012f73d4abe014ace44b46c23babd48aebbc by double-clicking
Emacs.app, then M-x shell, I get

$ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

That can't be right, or is it?

The same, one commit before that:

$ locale
LANG="en_DE.UTF-8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

At least LANG looks correct to me (I'm using an English UI, in DE.).
The LC_* are odd, though.

As an aside - vscode sets all of these vars to "en_US.UTF-8" which is
looks wrong, and the Zed editor does the same, except for LANG which it
set to "".

I must admit that I can't come to a conclusion here.  Maybe the right
thing would be LANG="en_DE.UTF-8" plus setting LC_ALL=$LANG like vscode?




This bug report was last modified 1 year and 227 days ago.

Previous Next


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