From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22392: Emacs OS X GUI doesn't set locale Date: Fri, 05 Feb 2016 21:46:10 +0200 Message-ID: <83r3grszy5.fsf@gnu.org> References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> <838u341cny.fsf__25231.4954218038$1454353164$gmane$org@gnu.org> <83r3grvcgy.fsf@gnu.org> <1454657792.67174.512690498.78EA5AE6@webmail.messagingengine.com> <83k2mjv7f2.fsf@gnu.org> <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454701644 18359 80.91.229.3 (5 Feb 2016 19:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2016 19:47:24 +0000 (UTC) Cc: 22392@debbugs.gnu.org To: Random832 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 20:47:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aRmLX-0003rz-QK for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 20:47:12 +0100 Original-Received: from localhost ([::1]:50159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRmLW-0004Hi-UD for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 14:47:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRmLS-0004F1-Mg for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 14:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRmLO-0005R6-If for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 14:47:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRmLO-0005R0-F2 for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 14:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRmLO-0000yB-A6 for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 14:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14547016033702 (code B ref 22392); Fri, 05 Feb 2016 19:47:02 +0000 Original-Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 19:46:43 +0000 Original-Received: from localhost ([127.0.0.1]:34745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRmL4-0000xd-Vg for submit@debbugs.gnu.org; Fri, 05 Feb 2016 14:46:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39542) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRmL3-0000xR-Gl for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 14:46:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRmKu-0005NV-Eh for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 14:46:36 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRmKu-0005NR-Aj; Fri, 05 Feb 2016 14:46:32 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2035 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRmKt-0001ID-6h; Fri, 05 Feb 2016 14:46:31 -0500 In-reply-to: <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> (message from Random832 on Fri, 05 Feb 2016 12:28:13 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112519 Archived-At: > From: Random832 > Cc: 22392@debbugs.gnu.org > Date: Fri, 05 Feb 2016 12:28:13 -0500 > > On Fri, Feb 5, 2016, at 04:21, Eli Zaretskii wrote: > > You can set LANG in the program's environment even if you don't launch > > subprocesses, just to have the relevant libc routines adjust their > > defaults. In fact, that's why Emacs does that in the first place. > > > > I'm asking why don't the programs you allude to do that already. If > > they do, then setting LANG in Emacs, and passing that to those > > programs as result, might interfere with what those programs already > > do. > > Because they don't need it. Because they don't use LANG at all, > internally or otherwise. Because they use Core Foundation instead of > libc for localization. (Though, for applications we do not have the > source code for, I don't know how we can say for sure that they don't > set LANG - the only way to find out if a process has set an environment > variable is to examine its subprocesses with ps -E.) > > If mac gui applications used LANG, then the GUI *would* set them when > launching applications, and we wouldn't be having this discussion. > > Emacs is in a fundamentally different category from most gui > applications (and in the same category as terminal emulators) because it > launches BSD-subsystem programs which use libc functions for > localization. It's therefore arguably responsible for providing > appropriate environment locale values for those BSD-subsystem programs. > Most applications *don't* launch BSD-subsystem programs as subprocesses. > Emacs (and e.g. other text editors, such as Vim, which also sets LANG in > os_mac_conv.c:mac_lang_init) and terminal emulators are exceptions to > this. > > Half of the *point* of this is to make sure subprocesses (like ispell, > or sort, or a shell in m-x terminal, etc) get the proper locale. I see your point, but I think it's largely based on speculations. Mine is as well, so I see no reason to continue arguing about this. I already said that I don't object to making these changes.