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 04:10:18 +0300 Message-ID: References: <83bl35o95u.fsf@gnu.org> <83cznkm25j.fsf@gnu.org> <838ry8lzal.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10626"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin) Cc: nisoni@algon.dk, stefan@marxist.se, 51321@debbugs.gnu.org, mardani29@yahoo.es, larsi@gnus.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 02 02:11:34 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 1mhiKr-0002Zs-9N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Nov 2021 02:11:34 +0100 Original-Received: from localhost ([::1]:40586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhiKq-0005LY-3s for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Nov 2021 21:11:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhiKM-0005LO-T3 for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 21:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhiKM-0004zs-Kw for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 21:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhiKM-0000Po-9u for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 21:11:02 -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 01:11:02 +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.16358154401564 (code B ref 51321); Tue, 02 Nov 2021 01:11:02 +0000 Original-Received: (at 51321) by debbugs.gnu.org; 2 Nov 2021 01:10:40 +0000 Original-Received: from localhost ([127.0.0.1]:36361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhiJu-0000P4-1T for submit@debbugs.gnu.org; Mon, 01 Nov 2021 21:10:40 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhiJp-0000Om-RX for 51321@debbugs.gnu.org; Mon, 01 Nov 2021 21:10:32 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5925E5C025C; Mon, 1 Nov 2021 21:10:24 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 01 Nov 2021 21:10:24 -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; s=fm1; bh=g8ds3+zLYmSyz9ApBzjyYujz9h Zbb2UdpUY7EYB/2TE=; b=IZTmcnPEdsYxa3F8oRRD//51yyrQY+BHwgSRZqoN37 kRva4WtFY/N+c1d93X+oYhjYzmK0AJ55B+Zpzcs+4dlEwcevyGctJRotoD1ePxmJ MN7DAe9ZOuVipP7gPPztDyxl88i0TNTNjoPOrZh2t6f6CFQijAu96PnuzyL1kc/z qsDbkwHgkGo9cCXr15/W5+EZj/X/R36+zFuzCsXfzd5AFsOSAK/uPsC8BJTbqgrD ExZwGsDeplnsBMQykS4xDoYjovojYtdjAx1KxEcwJgvTYfaEKxZ0CJE75h8GXYQ6 C0tWOGamCLdvWmCMdKDo1R9GhkMaZIruba0jlvmIb1UA== 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=g8ds3+ zLYmSyz9ApBzjyYujz9hZbb2UdpUY7EYB/2TE=; b=lYKixeArcoj9vaLhiGlrem ijxV+fOdArNTXyLK2Ee7nU2AxpMVlA+hexqVGLgWOrP8acnZ3z9vjvJSQzRHyLdP WYH1wDWG7lf0gP1KNZAkl7wvtVo0CTeRXd/QIOBv1ZHpM9A6rW2/1WHPau9Xe+pk om0rw0TZN6oHdWegs0bPtseqU5bVShFUyEofosOhOTUkoxU4pePepBKMJL3dmj2J HbqiRJ8JkZhKcuvC8gLm+SlaWKKjskMG2fXbkZ/O7NsP9ybAY5eCIZAxhjhd1+KD v4D1tupiUMtqlPGB+fQOdV3e28ubfXdf2t3CKrKcznb5eHYEneM1jAp/XnENqHRA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdehgedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhlihhp phcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecuggftrf grthhtvghrnhepvdevkeffvdeuvefhuddtjeehkedvueefveettddtveduudfgieffieev ieevhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Nov 2021 21:10:21 -0400 (EDT) In-Reply-To: (Alan Third's message of "Mon, 1 Nov 2021 21:17:36 +0000") 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:218794 Archived-At: On 01/11/2021 21:17 +0000, Alan Third wrote: > On Mon, Nov 01, 2021 at 04:34:58PM +0200, Eli Zaretskii wrote: >> > From: Filipp Gunbin >> > Cc: alan@idiocy.org, larsi@gnus.org, nisoni@algon.dk, stefan@marxist.se, >> > 51321@debbugs.gnu.org, mardani29@yahoo.es >> > Date: Mon, 01 Nov 2021 17:21:36 +0300 >> > >> > >> So maybe we should check that the locale is valid before setting it... >> > > >> > > "Valid" in what sense? Is that locale not installed on your system, >> > > or are you saying that it cannot exist? >> > >> > I think in the sense of 'locale -a | grep ru' in this case: >> > >> > ru_RU.ISO8859-5 >> > ru_RU.CP866 >> > ru_RU.CP1251 >> > ru_RU.UTF-8 >> > ru_RU.KOI8-R >> > ru_RU >> > >> > Maybe it could exist, but it doesn't on macOS. >> > >> > > (And why does the warning come from Bash when it was Emacs who sets >> > > the locale?) >> > >> > Forgot to tell - this output shows up when running shell command from >> > emacs (M-! or similar). >> >> Hmm... actually, why do we call setenv instead of calling setlocale >> directly? Doesn't macOS support setlocale? AFAIU, calling setlocale >> would then only affect Emacs itself, not its sub-processes. > > The point of this is to affect Emacs's sub-processes. > > 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? > > Anyway, I think we can use setlocale to test if the locale string is > valid, but I don't know if there are any other problems with that. > Would we want to reset it after testing? > > I suppose it might also be preferable to not even try doing this if > Emacs was run from a terminal since the original problem really only > manifests when Emacs is run from the GUI. > > Fillip, can you please try this: > [..] I see Daniel is saying that perhaps his patch should be reverted, so please let me know if you still want me to test this.