all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Random832 <random832@fastmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22392@debbugs.gnu.org
Subject: bug#22392: Emacs OS X GUI doesn't set locale
Date: Fri, 05 Feb 2016 12:28:13 -0500	[thread overview]
Message-ID: <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> (raw)
In-Reply-To: <83k2mjv7f2.fsf@gnu.org>

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.





  reply	other threads:[~2016-02-05 17:28 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 22:18 Emacs OS X GUI doesn't set locale Alan Third
2016-01-26  7:11 ` Anders Lindgren
2016-01-26 14:44   ` bug#22392: " Eli Zaretskii
2016-01-26 14:44   ` Eli Zaretskii
2016-01-26 15:06     ` Anders Lindgren
2016-01-26 15:14       ` bug#22392: " Eli Zaretskii
2016-01-26 15:14       ` Eli Zaretskii
2016-01-26 16:58         ` Anders Lindgren
2016-01-26 16:58         ` bug#22392: " Anders Lindgren
2016-01-26 23:05         ` Alan Third
2016-01-27 18:06           ` Paul Eggert
2016-01-27 19:44             ` Eli Zaretskii
2016-01-27 22:27               ` bug#22392: " Paul Eggert
2016-01-27 22:27               ` Paul Eggert
2016-01-27 19:44             ` bug#22392: " Eli Zaretskii
2016-01-28 22:53             ` Alan Third
2016-02-01  5:03               ` bug#22392: " Anders Lindgren
2016-02-01  5:03               ` Anders Lindgren
2016-02-01 17:48                 ` bug#22392: " Alan Third
2016-02-01 17:48                 ` Alan Third
2016-02-01 18:57                 ` Eli Zaretskii
2016-02-01 18:57                 ` bug#22392: " Eli Zaretskii
2016-02-10 23:57                 ` Alan Third
2016-02-11  2:37                   ` Paul Eggert
2016-01-28 22:53             ` Alan Third
2016-01-27 18:06           ` Paul Eggert
2016-01-17 14:27             ` bug#22392: 25.0.50; NS Emacs run from " Alan Third
2016-01-17 22:38               ` Random832
2016-01-18 21:12                 ` Alan Third
2016-01-18 22:09                   ` Random832
2016-01-18 23:11                     ` Alan Third
2016-01-19 15:55                       ` Eli Zaretskii
2016-01-19 16:03                     ` Eli Zaretskii
2016-01-30  6:13               ` bug#22392: Emacs " Random832
2016-02-05  7:12               ` Random832
2016-02-05  7:32                 ` Eli Zaretskii
2016-02-05  7:36                   ` Random832
2016-02-05  9:21                     ` Eli Zaretskii
2016-02-05 17:28                       ` Random832 [this message]
2016-02-05 19:46                         ` Eli Zaretskii
2016-01-26 23:05         ` Alan Third
2016-01-26 15:06     ` Anders Lindgren
2016-01-26 22:50   ` Alan Third
2016-01-27  6:21     ` bug#22392: " Anders Lindgren
2016-01-27  6:21     ` Anders Lindgren
2016-01-27 15:53       ` Eli Zaretskii
2016-01-27 15:53       ` bug#22392: " Eli Zaretskii
2016-01-26 22:50   ` Alan Third
2016-01-26  7:11 ` Anders Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com \
    --to=random832@fastmail.com \
    --cc=22392@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.