From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.bugs Subject: bug#22392: Emacs OS X GUI doesn't set locale Date: Fri, 05 Feb 2016 12:28:13 -0500 Message-ID: <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1454693367 2628 80.91.229.3 (5 Feb 2016 17:29:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2016 17:29:27 +0000 (UTC) Cc: 22392@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 18:29:13 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 1aRkC0-0002Q7-Ga for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 18:29:12 +0100 Original-Received: from localhost ([::1]:49629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRkC0-0006Q8-0s for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 12:29:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRkBu-0006La-4M for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 12:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRkBq-0007pK-BU for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 12:29:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRkBq-0007pF-8N for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 12:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRkBq-0002dm-1q for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 12:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 17:29: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.145469329610093 (code B ref 22392); Fri, 05 Feb 2016 17:29:02 +0000 Original-Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 17:28:16 +0000 Original-Received: from localhost ([127.0.0.1]:34628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRkB5-0002cj-Uw for submit@debbugs.gnu.org; Fri, 05 Feb 2016 12:28:16 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59296) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRkB4-0002cb-4L for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 12:28:14 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0A71E20898 for <22392@debbugs.gnu.org>; Fri, 5 Feb 2016 12:28:14 -0500 (EST) Original-Received: from web1 ([10.202.2.211]) by compute4.internal (MEProxy); Fri, 05 Feb 2016 12:28:14 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=/KvkdfyoGCduBC4y/vmCzOpNxlk=; b=sM8fz5 5OG/T0blgIYtT7mpxn14uOE0JhXzjs1AH8mU7HCaTLXVseuxtHSeyGHc4Tnyt9qg 4Hl40xx13hiknnBuRqcg8mgPR+fQOwTvJnbtpCpg28LllPPYXBo98TUk02yDpNLp EyStHhQV482V+S+jymgeikPTHOr9zqLiEXLiE= DKIM-Signature: v=1; a=rsa-sha1; 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-sasl-enc:x-sasl-enc; s=smtpout; bh=/KvkdfyoGCduBC4 y/vmCzOpNxlk=; b=fAXwHGIhbjOja94yYXp5ewF85nU5RX7zf9JPG5IafapozHg 01aGwHJt1qLo9zeZqiJ+N/nxbr779srL7XgNDiwYuC0gK1D0Iv6LDuidrnbaa+q9 z+LJfGJKh3qF0XCVEiz7dEAwunWk81H0MawHZ/IoBOaxMNQrR/l5fb9wDXQ0= Original-Received: by web1.nyi.internal (Postfix, from userid 99) id C77EDAF4A34; Fri, 5 Feb 2016 12:28:13 -0500 (EST) X-Sasl-Enc: xr6tITNTSLhg/5noYmUZpdoPmfYFuq+azM4U3CyeSbGg 1454693293 X-Mailer: MessagingEngine.com Webmail Interface - ajax-61414df5 In-Reply-To: <83k2mjv7f2.fsf@gnu.org> 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:112508 Archived-At: 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.