From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2016 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22392@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145304088023522 (code B ref -1); Sun, 17 Jan 2016 14:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jan 2016 14:28:00 +0000 Received: from localhost ([127.0.0.1]:51541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKoJD-00067J-Io for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:28:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43849) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKoJA-000675-TY for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKoJ2-0000Ii-J4 for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoJ2-0000Id-Ev for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoIz-0004vS-AP for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKoIw-0000HL-0t for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:45 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:37388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoIv-0000H0-I9 for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:41 -0500 Received: by mail-wm0-x22c.google.com with SMTP id n5so28802483wmn.0 for ; Sun, 17 Jan 2016 06:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=yiBqz81CXPGWzCAc7vCxawvI9jB3ZCMSU2bSgkdtxII=; b=Qu/rUsPtCLNYiR2uk9VSnhDivuPbmFP4ul8QcPkoMdPw80qIQFGWuoae3PxMQ2LfCp fMLhIe/IMvZyOEEzk5IAMG1K19jAQK65oIgBTYXRYashOp7CiFj+LYXIKqvWadkZLiTk YaMhAqRHWiTuEnd73C2Q+plpFiVsoiQb4Sec9pbIMS6+UfPp8CE0b0Zu4DpxgVPbaotU 0L+060s024kC2lznWMFvP27fsm8k4vndF5hfqkhByZ4yAu7K5lBO2mfoX0EX6dRLK7XM GeeW/fhU6OJOfWDsDmYCqUdlWzRvuzeUNJLUNPaIFphAwAJCwoRxhSwI1tP45LS62Imn 8UmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-type; bh=yiBqz81CXPGWzCAc7vCxawvI9jB3ZCMSU2bSgkdtxII=; b=fDaKzb3IiwhaLU3wO+O1rAmGPyCEnOwfa7ONIIADD1crQCLp18s0IqMb2hA0XPCaqK WVFVkB4p7qNXf27p0uevGA05c5RPMpjmjrHoC/YMMqO7lBs6r5nuYC/muul6d2k4W14/ cIonfsdg2M0TU8vTzSxMrgvky/UdICwhv2rJNWqUxnHBdBnmr5WU4AI9Tw6+FrxkF3fb EwshjQuIu9Mk2+oBE4s2M470QjCqeGUzp8CA496BxC1HT6LI5nd3ykPoPsBiUwcQMT0u mTeIyG4kEdi+VMfw3F4uoJOg1bA30rOKgE0C/TgVxbSZ1c+FeHIQwGEdtdjYIhkgYDIE to6A== X-Gm-Message-State: AG10YOTtb5AR/1l0ldhvmKLGfltEGh/hZdCdnieBlrKKlDzXFkp/se+KluwvivUNBYKUfQ== X-Received: by 10.28.176.133 with SMTP id z127mr8767490wme.22.1453040860324; Sun, 17 Jan 2016 06:27:40 -0800 (PST) Received: from galloway.local (0.9.e.d.9.e.c.9.d.6.d.2.1.4.c.4.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:4c41:2d6d:9ce9:de90]) by smtp.gmail.com with ESMTPSA id lh1sm19359265wjb.20.2016.01.17.06.27.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jan 2016 06:27:39 -0800 (PST) From: Alan Third Date: Sun, 17 Jan 2016 14:27:37 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain When Emacs is run from the OS X GUI (the dock, spotlight, finder, etc.) in OS X it doesn't set the locale correctly. Here's the output of C-h C RET on my machine with no user configuration: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): nil Coding system for keyboard input: = -- no-conversion (alias: binary) Coding system for terminal output: nil Coding system for inter-client cut and paste: nil Defaults for subprocess I/O: decoding: U -- utf-8-unix (alias: mule-utf-8-unix) encoding: U -- utf-8-unix (alias: mule-utf-8-unix) Priority order for recognizing coding systems when reading files: 1. utf-8 (alias: mule-utf-8) 2. iso-2022-7bit 3. iso-latin-1 (alias: iso-8859-1 latin-1) 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 I've snipped off the rest, if you want it I can provide it. Emacs relies on LC_ALL, LC_CTYPE or LANG being set, and OS X's terminal application sets the LANG environment variable. OS X doesn't set any of these variables when the application is run from the GUI. Additionally, Emacs detects when it's being run from the OS X terminal (mule-cmds.el line 2722) and hard-codes some settings. The Windows version of Emacs has a similar problem and solves this by running an "init_environment" function from main in emacs.c that uses the Windows APIs to set the LANG variable. (as described at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3221#32) I've written a patch that copies this functionality but for NextStep. c-h C RET gives: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for keyboard input: 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for terminal output: 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for inter-client cut and paste: nil Defaults for subprocess I/O: decoding: U -- utf-8-unix (alias: mule-utf-8-unix) encoding: U -- utf-8-unix (alias: mule-utf-8-unix) Priority order for recognizing coding systems when reading files: 1. iso-latin-1 (alias: iso-8859-1 latin-1) 2. utf-8 (alias: mule-utf-8) 3. iso-2022-7bit 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 Which looks better to me. It also gives me A4 paper instead of legal and ispell/hunspell is better behaved. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Set-locale-when-run-from-OS-X-GUI.patch Content-Description: NS environment patch >From 85d5d2f0213e052d1eccb6dc9e00f090b894ef90 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 17 Jan 2016 13:56:12 +0000 Subject: [PATCH] Set locale when run from OS X GUI * configure.ac: Add nsinit.o to NS_OBJC_OBJ and link the Foundation framework. * src/emacs.c (main): Include nsinit.h and run init_environment. * src/nsinit.c (init_environment): Get locale from OS and set LANG. * src/nsinit.h: header for including nsinit.c. --- configure.ac | 4 ++-- src/emacs.c | 8 ++++++++ src/nsinit.h | 20 ++++++++++++++++++++ src/nsinit.m | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/nsinit.h create mode 100644 src/nsinit.m diff --git a/configure.ac b/configure.ac index 6c9b621..7f61344 100644 --- a/configure.ac +++ b/configure.ac @@ -1892,7 +1892,7 @@ if test "${HAVE_NS}" = yes; then INSTALL_ARCH_INDEP_EXTRA= fi - NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile" + NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsinit.o $ns_fontfile" fi CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" @@ -5083,7 +5083,7 @@ case "$opsys" in ## only costs about 1.5K of wasted binary space. headerpad_extra=1000 if test "$HAVE_NS" = "yes"; then - libs_nsgui="-framework AppKit" + libs_nsgui="-framework AppKit -framework Foundation" if test "$NS_IMPL_COCOA" = "yes"; then libs_nsgui="$libs_nsgui -framework IOKit" fi diff --git a/src/emacs.c b/src/emacs.c index b1b2170..9473bcd 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -56,6 +56,10 @@ along with GNU Emacs. If not, see . */ #include #endif +#ifdef HAVE_NS +#include "nsinit.h" +#endif + #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ @@ -1371,6 +1375,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_ntproc (dumping); /* must precede init_editfns. */ #endif +#ifdef HAVE_NS + init_environment(); +#endif + /* Initialize and GC-protect Vinitial_environment and Vprocess_environment before set_initial_environment fills them in. */ diff --git a/src/nsinit.h b/src/nsinit.h new file mode 100644 index 0000000..41b79c8 --- /dev/null +++ b/src/nsinit.h @@ -0,0 +1,20 @@ +/* Definitions for initialising NeXT/Open/GNUstep environment + Copyright (C) 2016 Free Software Foundation, + Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +void init_environment (void); diff --git a/src/nsinit.m b/src/nsinit.m new file mode 100644 index 0000000..32281a6 --- /dev/null +++ b/src/nsinit.m @@ -0,0 +1,33 @@ +/* NeXT/Open/GNUstep / MacOSX initialisation functions. -*- coding: utf-8 -*- + +Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2016 Free Software +Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#include +#include + +/* Set up the environment in cases where Emacs has been run from the + GUI and therefore has missing environment variables. */ +void +init_environment (void) +{ + const char * locale = [[[NSLocale currentLocale] localeIdentifier] UTF8String]; + + /* Set LANG to locale, but not if LANG is already set. */ + setenv("LANG", locale, 0); +} -- 2.5.4 (Apple Git-61) --=-=-= Content-Type: text/plain In GNU Emacs 25.0.50.1 (x86_64-apple-darwin15.2.0, NS appkit-1404.34 Version 10.11.2 (Build 15C50)) of 2016-01-16 built on galloway.idiocy.org Repository revision: a0d5b7ae3bb014bb0b1c205d123c597df0e76411 Windowing system distributor 'Apple', version 10.3.1404 Configured features: JPEG IMAGEMAGICK ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS Important settings: locale-coding-system: utf-8 Major mode: Text Minor modes in effect: global-flycheck-mode: t flycheck-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: .emacs.d/elpa/seq-20151028.759/seq.el: Pattern t is deprecated. Use `_' instead [4 times] For information about GNU Emacs and the GNU system, type C-h C-a. Quit Making completion list... Quit Making completion list... Load-path shadows: /Users/alan/.emacs.d/elpa/magit-20160116.333/magit-popup hides /Users/alan/.emacs.d/elpa/magit-popup-20160107.437/magit-popup /Users/alan/.emacs.d/elpa/org-20160111/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox /Users/alan/.emacs.d/elpa/org-20160111/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo /Users/alan/.emacs.d/elpa/org-20160111/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish /Users/alan/.emacs.d/elpa/org-20160111/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org /Users/alan/.emacs.d/elpa/org-20160111/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt /Users/alan/.emacs.d/elpa/org-20160111/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md /Users/alan/.emacs.d/elpa/org-20160111/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man /Users/alan/.emacs.d/elpa/org-20160111/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex /Users/alan/.emacs.d/elpa/org-20160111/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar /Users/alan/.emacs.d/elpa/org-20160111/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html /Users/alan/.emacs.d/elpa/org-20160111/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer /Users/alan/.emacs.d/elpa/org-20160111/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii /Users/alan/.emacs.d/elpa/org-20160111/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org /Users/alan/.emacs.d/elpa/org-20160111/org-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-w3m /Users/alan/.emacs.d/elpa/org-20160111/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version /Users/alan/.emacs.d/elpa/org-20160111/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer /Users/alan/.emacs.d/elpa/org-20160111/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table /Users/alan/.emacs.d/elpa/org-20160111/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src /Users/alan/.emacs.d/elpa/org-20160111/org-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-rmail /Users/alan/.emacs.d/elpa/org-20160111/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol /Users/alan/.emacs.d/elpa/org-20160111/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot /Users/alan/.emacs.d/elpa/org-20160111/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete /Users/alan/.emacs.d/elpa/org-20160111/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse /Users/alan/.emacs.d/elpa/org-20160111/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile /Users/alan/.emacs.d/elpa/org-20160111/org-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mhe /Users/alan/.emacs.d/elpa/org-20160111/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs /Users/alan/.emacs.d/elpa/org-20160111/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro /Users/alan/.emacs.d/elpa/org-20160111/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs /Users/alan/.emacs.d/elpa/org-20160111/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list /Users/alan/.emacs.d/elpa/org-20160111/org-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-irc /Users/alan/.emacs.d/elpa/org-20160111/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install /Users/alan/.emacs.d/elpa/org-20160111/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask /Users/alan/.emacs.d/elpa/org-20160111/org-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-info /Users/alan/.emacs.d/elpa/org-20160111/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent /Users/alan/.emacs.d/elpa/org-20160111/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id /Users/alan/.emacs.d/elpa/org-20160111/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit /Users/alan/.emacs.d/elpa/org-20160111/org-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-gnus /Users/alan/.emacs.d/elpa/org-20160111/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote /Users/alan/.emacs.d/elpa/org-20160111/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed /Users/alan/.emacs.d/elpa/org-20160111/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces /Users/alan/.emacs.d/elpa/org-20160111/org-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-eshell /Users/alan/.emacs.d/elpa/org-20160111/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities /Users/alan/.emacs.d/elpa/org-20160111/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element /Users/alan/.emacs.d/elpa/org-20160111/org-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-docview /Users/alan/.emacs.d/elpa/org-20160111/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree /Users/alan/.emacs.d/elpa/org-20160111/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags /Users/alan/.emacs.d/elpa/org-20160111/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt /Users/alan/.emacs.d/elpa/org-20160111/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat /Users/alan/.emacs.d/elpa/org-20160111/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview /Users/alan/.emacs.d/elpa/org-20160111/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock /Users/alan/.emacs.d/elpa/org-20160111/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture /Users/alan/.emacs.d/elpa/org-20160111/org-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bibtex /Users/alan/.emacs.d/elpa/org-20160111/org-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bbdb /Users/alan/.emacs.d/elpa/org-20160111/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach /Users/alan/.emacs.d/elpa/org-20160111/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive /Users/alan/.emacs.d/elpa/org-20160111/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda /Users/alan/.emacs.d/elpa/org-20160111/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob /Users/alan/.emacs.d/elpa/org-20160111/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle /Users/alan/.emacs.d/elpa/org-20160111/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table /Users/alan/.emacs.d/elpa/org-20160111/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite /Users/alan/.emacs.d/elpa/org-20160111/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql /Users/alan/.emacs.d/elpa/org-20160111/ob-shen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shen /Users/alan/.emacs.d/elpa/org-20160111/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen /Users/alan/.emacs.d/elpa/org-20160111/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme /Users/alan/.emacs.d/elpa/org-20160111/ob-scala hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scala /Users/alan/.emacs.d/elpa/org-20160111/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass /Users/alan/.emacs.d/elpa/org-20160111/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby /Users/alan/.emacs.d/elpa/org-20160111/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref /Users/alan/.emacs.d/elpa/org-20160111/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R /Users/alan/.emacs.d/elpa/org-20160111/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python /Users/alan/.emacs.d/elpa/org-20160111/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml /Users/alan/.emacs.d/elpa/org-20160111/ob-picolisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-picolisp /Users/alan/.emacs.d/elpa/org-20160111/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl /Users/alan/.emacs.d/elpa/org-20160111/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org /Users/alan/.emacs.d/elpa/org-20160111/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave /Users/alan/.emacs.d/elpa/org-20160111/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml /Users/alan/.emacs.d/elpa/org-20160111/ob-mscgen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-mscgen /Users/alan/.emacs.d/elpa/org-20160111/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima /Users/alan/.emacs.d/elpa/org-20160111/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab /Users/alan/.emacs.d/elpa/org-20160111/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile /Users/alan/.emacs.d/elpa/org-20160111/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob /Users/alan/.emacs.d/elpa/org-20160111/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp /Users/alan/.emacs.d/elpa/org-20160111/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond /Users/alan/.emacs.d/elpa/org-20160111/ob-ledger hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ledger /Users/alan/.emacs.d/elpa/org-20160111/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex /Users/alan/.emacs.d/elpa/org-20160111/ob-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-keys /Users/alan/.emacs.d/elpa/org-20160111/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js /Users/alan/.emacs.d/elpa/org-20160111/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java /Users/alan/.emacs.d/elpa/org-20160111/ob-io hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-io /Users/alan/.emacs.d/elpa/org-20160111/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell /Users/alan/.emacs.d/elpa/org-20160111/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot /Users/alan/.emacs.d/elpa/org-20160111/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran /Users/alan/.emacs.d/elpa/org-20160111/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp /Users/alan/.emacs.d/elpa/org-20160111/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval /Users/alan/.emacs.d/elpa/org-20160111/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp /Users/alan/.emacs.d/elpa/org-20160111/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot /Users/alan/.emacs.d/elpa/org-20160111/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa /Users/alan/.emacs.d/elpa/org-20160111/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css /Users/alan/.emacs.d/elpa/org-20160111/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core /Users/alan/.emacs.d/elpa/org-20160111/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint /Users/alan/.emacs.d/elpa/org-20160111/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure /Users/alan/.emacs.d/elpa/org-20160111/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc /Users/alan/.emacs.d/elpa/org-20160111/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C /Users/alan/.emacs.d/elpa/org-20160111/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk /Users/alan/.emacs.d/elpa/org-20160111/ob-asymptote hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-asymptote /Users/alan/.emacs.d/elpa/seq-20151028.759/seq hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec epg gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils paredit flycheck find-func help-mode rx subr-x seq gv dash exec-path-from-shell finder-inf autoinsert csv-mode-autoloads gnuplot-autoloads go-mode-autoloads paredit-autoloads quack-autoloads queue-autoloads typopunct-autoloads info package epg-config wombat-theme cl-seq unichar easy-mmode powershell-mode derived compile comint ansi-color ring speedbar sb-image ezimage dframe easymenu edmacro kmacro cl-loaddefs pcase cl-lib windmove paren server time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 292894 11471) (symbols 48 27242 0) (miscs 40 65 228) (strings 32 44073 8751) (string-bytes 1 1326190) (vectors 16 43065) (vector-slots 8 757477 4748) (floats 8 188 150) (intervals 56 211 79) (buffers 976 14)) -- Alan Third --=-=-=-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale In-Reply-To: Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2016 22:39:01 +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: To: 22392@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145307033511256 (code B ref -1); Sun, 17 Jan 2016 22:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jan 2016 22:38:55 +0000 Received: from localhost ([127.0.0.1]:52155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKvyJ-0002vU-G6 for submit@debbugs.gnu.org; Sun, 17 Jan 2016 17:38:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56727) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKvyH-0002vH-90 for submit@debbugs.gnu.org; Sun, 17 Jan 2016 17:38:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKvyB-0000Bk-4s for submit@debbugs.gnu.org; Sun, 17 Jan 2016 17:38:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_BARE_IP_2,RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKvyB-0000Bg-1S for submit@debbugs.gnu.org; Sun, 17 Jan 2016 17:38:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKvyA-0004A3-4Y for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 17:38:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKvy5-0000BB-2x for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 17:38:46 -0500 Received: from plane.gmane.org ([80.91.229.3]:44413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKvy4-0000Ap-Sd for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 17:38:41 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aKvy1-0005yd-95 for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 23:38:37 +0100 Received: from 166.175.187.150 ([166.175.187.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2016 23:38:37 +0100 Received: from random832 by 166.175.187.150 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2016 23:38:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Random832 Date: Sun, 17 Jan 2016 17:38:24 -0500 Lines: 14 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 166.175.187.150 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:T0TGy/J9jjGF2XLSJzcwgjf5g+U= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Alan Third writes: > Default coding system (for new files): > 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Is this really appropriate? I'm not sure like the fact that it's not UTF-8. How does Terminal (and iTerm) know to use UTF-8? > Priority order for recognizing coding systems when reading files: > 1. iso-latin-1 (alias: iso-8859-1 latin-1) > 2. utf-8 (alias: mule-utf-8) This one also makes me wonder if the encoding specified in .CFUserTextEncoding/__CF_USER_TEXT_ENCODING should be used for a second choice. Which may be an encoding that may not map directly to a locale. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2016 21:13: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: To: Random832 Cc: 22392@debbugs.gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14531515624408 (code B ref 22392); Mon, 18 Jan 2016 21:13:02 +0000 Received: (at 22392) by debbugs.gnu.org; 18 Jan 2016 21:12:42 +0000 Received: from localhost ([127.0.0.1]:53222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLH6Q-000192-98 for submit@debbugs.gnu.org; Mon, 18 Jan 2016 16:12:42 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38192) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLH6O-00018n-Pi for 22392@debbugs.gnu.org; Mon, 18 Jan 2016 16:12:41 -0500 Received: by mail-wm0-f51.google.com with SMTP id b14so141764121wmb.1 for <22392@debbugs.gnu.org>; Mon, 18 Jan 2016 13:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2Ymsy0dOG25bRnNO17a15NXCT2VFwPLDyYUMmTtVw9I=; b=nZWm5kDX1TlYmKG6+M8bvDPzQQBfIf7ouEccr3xRTkC3cGaTMTUAh1iSuYfpa9KkqR II2GTRyHsLxTRvPan8pgl3khFjmv8yOpGqomJ8ZcfYj7G2bPSQ/U8gpzuKrX59ROe7NE 9wHB87V9EDYSaXe6i9ZEeQ6st24Q+5k4x25OKbxEI7zWoCR1qrcIfR9Yx9mCAEMdXb2K qhZT8PbKht7i5Q8iQ73eVqlU0TLrR1clpjhLnDDsgRHLZ9Xiy2w5Up/JXm+n4XQZA7ci Qvzji9s0ZrGfVh47E41fzM2kXK1ED+3rmacU0diw2OsrgpQdEPzWSSrVOK4Vy3RNEha0 oe7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=2Ymsy0dOG25bRnNO17a15NXCT2VFwPLDyYUMmTtVw9I=; b=fJBK9G2hP0aRBYhpcOyBT87MK7pBqJt3pr39yBXjsA6Sg3CgigiOJRZWNxt63duHXh FNl1Jl94Q+dPDlwbZshCq8akG1UEN0TByGwi78gsCfsd44bKX/O13T/pydq+u1mtQqwV fqKy1YsalqK02m5xNILLuzRMUA0A2u6M+aqtBOVh9N4U7q11jtL9y9cglAEnMC342zvm B4KGw2mTnC3N7a/XgmQ4BVwrB5NXBR45JWzqVCYMmfn291VeF9/tdt8obcQoW7Xg+ala kzptZy/ANRbaEHOZvOjwcrv2vljvCImvNoIRhPnsMNhrwDVIhPwLT+hhf6h0TMlqdS6M 1N7A== X-Gm-Message-State: ALoCoQlexJXCIjlzpnm83Ygi87OvK/lWf0SvqDmI4008HqiUgrMEYze9c9psmQlCL8POgwzFsBH5e8OwINo7kY5mXIIl13wsIw== X-Received: by 10.194.87.201 with SMTP id ba9mr26725389wjb.125.1453151554557; Mon, 18 Jan 2016 13:12:34 -0800 (PST) Received: from galloway.idiocy.org (0.9.e.d.9.e.c.9.d.6.d.2.1.4.c.4.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:4c41:2d6d:9ce9:de90]) by smtp.gmail.com with ESMTPSA id az10sm25539616wjc.28.2016.01.18.13.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 13:12:33 -0800 (PST) From: Alan Third References: Date: Mon, 18 Jan 2016 21:12:31 +0000 In-Reply-To: (Random's message of "Sun, 17 Jan 2016 17:38:24 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Random832 writes: > Alan Third writes: >> Default coding system (for new files): >> 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) > > Is this really appropriate? I'm not sure like the fact that it's not > UTF-8. I don't know if it's appropriate for OS X, but I'm pretty sure it matches the codings that the Windows port gives me for en_GB (ENG, in Windows). Besides, surely it's better than 'nil'? > How does Terminal (and iTerm) know to use UTF-8? If you load Emacs on OS X from the terminal this code changes some settings (set-locale-environment in mule-cmds.el): (when (eq system-type 'darwin) ;; On Darwin, file names are always encoded in utf-8, no matter ;; the locale. (setq default-file-name-coding-system 'utf-8) ;; Mac OS X's Terminal.app by default uses utf-8 regardless of ;; the locale. (when (and (null window-system) (equal (getenv "TERM_PROGRAM" frame) "Apple_Terminal")) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8))) So I assume this is how running it from the terminal results in more UTF-8 codings being used. Perhaps this code should kick-in more generally? I don't know. The other possibility is that Terminal.app sets LANG to 'en_GB.UTF-8'. That final part may be the difference we're seeing here? >> Priority order for recognizing coding systems when reading files: >> 1. iso-latin-1 (alias: iso-8859-1 latin-1) >> 2. utf-8 (alias: mule-utf-8) > > This one also makes me wonder if the encoding specified in > .CFUserTextEncoding/__CF_USER_TEXT_ENCODING should be used for a second > choice. Which may be an encoding that may not map directly to a locale. I'm afriad I don't know what you're talking about here. -- Alan Third From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2016 22:10:01 +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: To: Alan Third Cc: 22392@debbugs.gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14531549479858 (code B ref 22392); Mon, 18 Jan 2016 22:10:01 +0000 Received: (at 22392) by debbugs.gnu.org; 18 Jan 2016 22:09:07 +0000 Received: from localhost ([127.0.0.1]:53236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHz1-0002Yv-2E for submit@debbugs.gnu.org; Mon, 18 Jan 2016 17:09:07 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:40686) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHyz-0002Yn-4W for 22392@debbugs.gnu.org; Mon, 18 Jan 2016 17:09:05 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 25E4F2080E for <22392@debbugs.gnu.org>; Mon, 18 Jan 2016 17:09:03 -0500 (EST) Received: from web1 ([10.202.2.211]) by compute6.internal (MEProxy); Mon, 18 Jan 2016 17:09:03 -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=HFlNgXjKU+FLxVDttGWkeJrkgig=; b=3hFtAS USCP8vSG7v4wasp8WR0DvfnmfLuM5Hp6u8oFCvaf/kUKjWh6t1B1e4P+3mUWzZr4 o3s2U1EfqHHJG+8E7AVzeSk+DSVJhdL72achcJI9PMhJHonypHDZIpdol0a4SeV1 XgYyphWnXy0r4QZuuu7ZZgu7Pqw4sBxyDmhOg= 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=HFlNgXjKU+FLxVD ttGWkeJrkgig=; b=hGvm50uuDcYeBKSBBXtBmd69whV2x86/7gCuwBe/3w0atFR 9j6+BbgWXnMQRmXoFCoVWikkK6sgytOBJZ6UQrQWw1qXeBrPCgXGJZiihZx8ggYR aPAS0lsm+jfeM+Xv0TquphKi9QMaZVSyKcSMoyV5bpvINYsEwudjfi3wQ5uE= Received: by web1.nyi.internal (Postfix, from userid 99) id EF163AF2697; Mon, 18 Jan 2016 17:09:02 -0500 (EST) Message-Id: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> X-Sasl-Enc: IfOwEU0l1tyITAFQLdbtsoR7XHX52kKlXXitVR7Jro7E 1453154942 From: Random832 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cda141f In-Reply-To: References: Date: Mon, 18 Jan 2016 17:09:02 -0500 X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) On Mon, Jan 18, 2016, at 16:12, Alan Third wrote: > I don't know if it's appropriate for OS X, but I'm pretty sure it > matches the codings that the Windows port gives me for en_GB (ENG, in > Windows). Besides, surely it's better than 'nil'? Well, I don't have any trouble opening UTF-8 files. I'm incidentally not sure that it's really appropriate for windows, either - there, it should be using windows-1252, not iso-latin-1. I have to wonder how Emacs behaves on versions of windows whose default codepage is not a trivial superset of an ISO one. The proper encoding should be able to be determined by the GetACP function, and should always be a windows codepage. > > How does Terminal (and iTerm) know to use UTF-8? > > If you load Emacs on OS X from the terminal this code changes some > settings (set-locale-environment in mule-cmds.el): I meant Terminal itself, not Emacs within terminal. For me, it seems to put LANG=en_US.UTF-8 in the environment. > The other possibility is that Terminal.app sets LANG to 'en_GB.UTF-8'. > That final part may be the difference we're seeing here? Yes, I think so. I was wondering also if there's some hidden setting that tells Terminal whether to use UTF-8 or not - I don't think it used it in the earliest versions of OSX. > > This one also makes me wonder if the encoding specified in > > .CFUserTextEncoding/__CF_USER_TEXT_ENCODING should be used for a second > > choice. Which may be an encoding that may not map directly to a locale. > > I'm afriad I don't know what you're talking about here. You may have a file .CFUserTextEncoding in your home directory, or an environment variable __CF_USER_TEXT_ENCODING, specifying a value like [0x1F5:]0x0:0x0 - the first one (in the environment variable only) is your user ID, the next is the encoding (0x0 for MacRoman) which Finder uses for preview of non-UTF8 text files, and the last is the language (0 for English, maybe only US English) For me this is MacRoman (and works as I described with Finder preview windows) even though there is no actual Unix locale for MacRoman. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2016 23:12:01 +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: To: Random832 Cc: 22392@debbugs.gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145315871215712 (code B ref 22392); Mon, 18 Jan 2016 23:12:01 +0000 Received: (at 22392) by debbugs.gnu.org; 18 Jan 2016 23:11:52 +0000 Received: from localhost ([127.0.0.1]:53247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLIxk-00045K-4z for submit@debbugs.gnu.org; Mon, 18 Jan 2016 18:11:52 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:34651) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLIxi-000456-V1 for 22392@debbugs.gnu.org; Mon, 18 Jan 2016 18:11:51 -0500 Received: by mail-wm0-f53.google.com with SMTP id u188so122102041wmu.1 for <22392@debbugs.gnu.org>; Mon, 18 Jan 2016 15:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=XnFD/H6fT+wXAiGrx0KnOQm9toHVtCW++HEVZIESEO0=; b=cSrr3GzBJopycsp74Oc1CO2Ih0MTkzdvTPkUUhgc6ggFtaidmT256dsjIFHhfBaW8K c2hprEA3iMpzxPOgIoKVI8xF2XTyS58x+/pZ9IjQjaCH6Ae+lgAddbr12yHxmeb/W+uM Jt7FMWNMY26qJwonVkP437t3Ask7yUptElyvWB4vaKwhc1D+VoJJ0KHev/PyK6mnUVws CznKdKXgs4EBCS3DhSywSKW9Nd390+hTTNYKZ5/1NJiHLfv/KiMaFXsm5fTEk1DH3wPB ympkOv5fHncgCFCq5P4JyaWW3cdTqA9UrxATkZSNyy8fmyJKXpAXHbb4X0KYvSI86jCn ijHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=XnFD/H6fT+wXAiGrx0KnOQm9toHVtCW++HEVZIESEO0=; b=RCHyTSUrBuXu/pju/oj3Ewbu7ogeLqJRCXbwNyiQXFdDOvfVYdumMWDPnNdy/WJ17y 8EMZaPyf9q5hS4xpI3LfgWtJ24sVqSUF6eKXVwK7/P6hBxIs+WDvcssdGJdFlZ4Ty4kr 92izKplf15J5LkK5/JASCKx/evwRAEPFdDeCZKP/ZG/r4eCnyx32UeZJ4KdwEaFzreeA i4WZDe1yIfoRBtmeYEZ3ogQxvj4MnmQ2Y4KMOZZQjd9cngMleAbgOwVbYny/BJ5+HLDX P+2X8emthFS32VT/fJpSV/Q8B15PqqdiW1xwAKuvz/NAcAt1ERWqHHtUN5I1RzJ4RctM kw4w== X-Gm-Message-State: AG10YOR1Mw0LisdsdG1RRkwm3zsk7M1jpvW4nC0nGkWI8daNcizN3MQpMqGE8hCDybVmuw== X-Received: by 10.28.21.19 with SMTP id 19mr14891037wmv.43.1453158705459; Mon, 18 Jan 2016 15:11:45 -0800 (PST) Received: from galloway.idiocy.org (0.9.e.d.9.e.c.9.d.6.d.2.1.4.c.4.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:4c41:2d6d:9ce9:de90]) by smtp.gmail.com with ESMTPSA id jo6sm26005371wjb.48.2016.01.18.15.11.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 15:11:44 -0800 (PST) From: Alan Third References: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> Date: Mon, 18 Jan 2016 23:11:43 +0000 In-Reply-To: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> (Random's message of "Mon, 18 Jan 2016 17:09:02 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Random832 writes: > On Mon, Jan 18, 2016, at 16:12, Alan Third wrote: >> I don't know if it's appropriate for OS X, but I'm pretty sure it >> matches the codings that the Windows port gives me for en_GB (ENG, in >> Windows). Besides, surely it's better than 'nil'? > > Well, I don't have any trouble opening UTF-8 files. I'm incidentally not > sure that it's really appropriate for windows, either - there, it should > be using windows-1252, not iso-latin-1. I have to wonder how Emacs > behaves on versions of windows whose default codepage is not a trivial > superset of an ISO one. The proper encoding should be able to be > determined by the GetACP function, and should always be a windows > codepage. I realised almost immediately after sending the message that this is crap. What I was thinking was that in Windows I don't get a UTF-8 coding. You're entirely right. >> The other possibility is that Terminal.app sets LANG to 'en_GB.UTF-8'. >> That final part may be the difference we're seeing here? > > Yes, I think so. I was wondering also if there's some hidden setting > that tells Terminal whether to use UTF-8 or not - I don't think it used > it in the earliest versions of OSX. There's a setting in Profiles -> Advanced that lets you select UTF-8. It's UTF-8 by default on my system. If I change it I get just "en_GB". Just to test I changed my code to append ".UTF-8" on the end of what it's pulling from the system (so on my machine LANG gets set to "en_GB.UTF-8", and here's the output from c-H C RET: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): U -- utf-8-unix (alias: mule-utf-8-unix) Coding system for keyboard input: U -- utf-8-unix (alias: mule-utf-8-unix) Coding system for terminal output: U -- utf-8-unix (alias: mule-utf-8-unix) Coding system for inter-client cut and paste: nil Defaults for subprocess I/O: decoding: U -- utf-8-unix (alias: mule-utf-8-unix) encoding: U -- utf-8-unix (alias: mule-utf-8-unix) Priority order for recognizing coding systems when reading files: 1. utf-8 (alias: mule-utf-8) 2. iso-2022-7bit 3. iso-latin-1 (alias: iso-8859-1 latin-1) 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 So that does make a difference. The question is what is the correct behaviour here? I, like you, would rather get UTF-8 everywhere, but is that the *correct* behaviour for an unconfigured system run from the GUI? >> > This one also makes me wonder if the encoding specified in >> > .CFUserTextEncoding/__CF_USER_TEXT_ENCODING should be used for a second >> > choice. Which may be an encoding that may not map directly to a locale. Possibly. I believe there's a way to extract a list of preferred languages from OS X which are separate from the selected locale. That may be a better way? Although, thinking about it, languages don't necessarily map to encodings either. > You may have a file .CFUserTextEncoding in your home directory, or an > environment variable __CF_USER_TEXT_ENCODING, specifying a value like > [0x1F5:]0x0:0x0 - the first one (in the environment variable only) is > your user ID, the next is the encoding (0x0 for MacRoman) which Finder > uses for preview of non-UTF8 text files, and the last is the language (0 > for English, maybe only US English) Ah yes, I have exactly the same as you. -- Alan Third From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jan 2016 15:56: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: To: Alan Third Cc: random832@fastmail.com, 22392@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145321895611483 (code B ref 22392); Tue, 19 Jan 2016 15:56:02 +0000 Received: (at 22392) by debbugs.gnu.org; 19 Jan 2016 15:55:56 +0000 Received: from localhost ([127.0.0.1]:53873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLYdP-0002z9-RB for submit@debbugs.gnu.org; Tue, 19 Jan 2016 10:55:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43485) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLYdO-0002yx-3x for 22392@debbugs.gnu.org; Tue, 19 Jan 2016 10:55:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLYdF-0003a9-Ll for 22392@debbugs.gnu.org; Tue, 19 Jan 2016 10:55:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLYdF-0003a5-JE; Tue, 19 Jan 2016 10:55:45 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2059 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aLYdE-0003Iu-Ru; Tue, 19 Jan 2016 10:55:45 -0500 Date: Tue, 19 Jan 2016 17:55:53 +0200 Message-Id: <838u3ld0mu.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Alan Third on Mon, 18 Jan 2016 23:11:43 +0000) References: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alan Third > Date: Mon, 18 Jan 2016 23:11:43 +0000 > Cc: 22392@debbugs.gnu.org > > Possibly. I believe there's a way to extract a list of preferred > languages from OS X which are separate from the selected locale. That > may be a better way? Although, thinking about it, languages don't > necessarily map to encodings either. They do in Emacs, see locale-language-names in mule-cmds.el. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jan 2016 16:04: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: To: Random832 Cc: 22392@debbugs.gnu.org, alan@idiocy.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145321940612228 (code B ref 22392); Tue, 19 Jan 2016 16:04:02 +0000 Received: (at 22392) by debbugs.gnu.org; 19 Jan 2016 16:03:26 +0000 Received: from localhost ([127.0.0.1]:53880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLYkg-0003BA-K5 for submit@debbugs.gnu.org; Tue, 19 Jan 2016 11:03:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47255) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLYke-0003Ay-Jn for 22392@debbugs.gnu.org; Tue, 19 Jan 2016 11:03:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLYkU-0007cI-N1 for 22392@debbugs.gnu.org; Tue, 19 Jan 2016 11:03:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLYkU-0007cE-KX; Tue, 19 Jan 2016 11:03:14 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2064 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aLYkT-0001K2-SJ; Tue, 19 Jan 2016 11:03:14 -0500 Date: Tue, 19 Jan 2016 18:03:22 +0200 Message-Id: <8360ypd0ad.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> (message from Random832 on Mon, 18 Jan 2016 17:09:02 -0500) References: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Random832 > Date: Mon, 18 Jan 2016 17:09:02 -0500 > Cc: 22392@debbugs.gnu.org > > I'm incidentally not sure that it's really appropriate for windows, > either - there, it should be using windows-1252, not iso-latin-1. I don't remember any complaints about that. The related code is very old. > I have to wonder how Emacs behaves on versions of windows whose > default codepage is not a trivial superset of an ISO one. See locale-language-names. Which locales and codepages did you have in mind, specifically? > The proper encoding should be able to be determined by the GetACP > function, and should always be a windows codepage. Depends on what the proper encoding will be used for. In general Windows has 2 - 3 pertinent codepages at any given time, each one used for different purposes. (Emacs also has several coding-systems to set by default.) From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 07:12: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: To: Alan Third Cc: 22392@debbugs.gnu.org, emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145379228117000 (code B ref 22392); Tue, 26 Jan 2016 07:12:02 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 07:11:21 +0000 Received: from localhost ([127.0.0.1]:36571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNxma-0004Q7-K7 for submit@debbugs.gnu.org; Tue, 26 Jan 2016 02:11:21 -0500 Received: from mail-vk0-f47.google.com ([209.85.213.47]:34577) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNxmY-0004Pu-QT for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 02:11:19 -0500 Received: by mail-vk0-f47.google.com with SMTP id e185so86755143vkb.1 for <22392@debbugs.gnu.org>; Mon, 25 Jan 2016 23:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=z1FZThLkIND2G5Y057ETp19TvlMrny9jjAFu1iXki/Q=; b=vv4kReFm9K9nsi2DvnqigKLZkk1Y4ZuiTg5hspLjCl0FG1cGGQEq9pPVK9rY0PUXlP HQZgivWzUSje70uknTFGEgSv9NNqBtrYd9b4ql5r24YHFPwpFdINBslevI/J1O8V7egV VGr2o1/JxtOUBLfHbmkNIx8aZAsxhvZhfUZNbsd9Qm0+akr516Rp2Sivw5GnJX6oY2E5 zxVjMAqBWxBrxJkBjdQqvTPQkiR1gmzw2yS3+qkHEC4LBthOnklXQDVaaBm/e9GtPdib 5Sw9BrPEpzgj57n+pDHhjciDmBfjmk6B6864is+24Qs2q6hkn8SW267hqidoZcVhw5Zd xb/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=z1FZThLkIND2G5Y057ETp19TvlMrny9jjAFu1iXki/Q=; b=O+umU4HG1PYhXUv/YDEieS/W7m56r0w6bkbJIpSO40aTbf0lKrSvC+xJ2sjlbks1Iy PAGHvmAfj+5Zv5mXwWdH6mx5xUfvPj2sP1pYFCqxA0neWqc2xDeLB149tpwqWLO8cUhN NpE2pW5JcN271LPy2eV7RN9q4B1ADcu+z2RxdzTL35NFbi6jvVN4viTc+kuhJeiTSi+9 saWbgmLt4U1ZOqKmOMZzy3G/oBC6EeEkT/Ynu+mZQePjtTdNo3efEnJdO8r8ouB47of5 u7yXkJPac5gMdI8oryU9dimuQbvUuDbYj5ZZggP0WWtbdfDEI2tOQsEYiF7IWIp2SwV/ ArFA== X-Gm-Message-State: AG10YOTnZQKkAPxwMXSIJ82dZtfwzsCAK04yWRdr/LKhPjYcYOypTBiz3iBkduKND87MVnJgbeI3lfXuIzF55Q== MIME-Version: 1.0 X-Received: by 10.31.162.3 with SMTP id l3mr13614600vke.68.1453792273224; Mon, 25 Jan 2016 23:11:13 -0800 (PST) Received: by 10.31.214.131 with HTTP; Mon, 25 Jan 2016 23:11:13 -0800 (PST) In-Reply-To: References: Date: Tue, 26 Jan 2016 08:11:13 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a114406ea05dc35052a3764f5 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a114406ea05dc35052a3764f5 Content-Type: text/plain; charset=UTF-8 Hi, This sounds like a good change. Unfortunately, I can't answer the locale-questions you raised in the mail. However, I have a few small questions: * Why a separate source file? Is there any technical reasons why this couldn't reside in, say, nsterm.m? * Can you add a "NSTRACE" line to the function, so that it's clear when this function is called, when NSTRACE is enabled. * Have you considered populating `process-environment' instead of setting LANG in the Emacs process? Would there be any advantages/disadvantages with this approach? -- Anders Lindgren On Mon, Jan 25, 2016 at 11:18 PM, Alan Third wrote: > I've raised a bug (bug#22392) about Emacs on OS X not setting the locale > and character encodings when launched from the GUI (finder, spotlight, > etc.). As far as I can tell it's because Emacs looks at LC_ALL, LC_TYPE > and LANG for the locale information, but it's not set when launched from > the GUI. It IS set in terminal.app, so if you launch from there it all > looks good. > > Apparently the Windows version has the same problem and sorts it by > setting LANG from a function called early in in main in emacs.c. > > I've written a patch that copies this method. It calls the NextStep > function for getting the locale and then sets LANG if it's not already > set. I'm not sure that's it's the best way of doing it. I had to create > a new Objective C file and header to include in emacs.c. > > There was also a question raised about what the correct character > encodings are for OS X. On my machine it sets LANG to en_GB and most of > the character encodings to iso-latin-1-unix, which looks OK to me, but > it was suggested that they should be UTF-8. > > Does anyone know what the correct encodings are on OS X? > > > From 85d5d2f0213e052d1eccb6dc9e00f090b894ef90 Mon Sep 17 00:00:00 2001 > From: Alan Third > Date: Sun, 17 Jan 2016 13:56:12 +0000 > Subject: [PATCH] Set locale when run from OS X GUI > > * configure.ac: Add nsinit.o to NS_OBJC_OBJ and link the Foundation > framework. > * src/emacs.c (main): Include nsinit.h and run init_environment. > * src/nsinit.c (init_environment): Get locale from OS and set LANG. > * src/nsinit.h: header for including nsinit.c. > --- > configure.ac | 4 ++-- > src/emacs.c | 8 ++++++++ > src/nsinit.h | 20 ++++++++++++++++++++ > src/nsinit.m | 33 +++++++++++++++++++++++++++++++++ > 4 files changed, 63 insertions(+), 2 deletions(-) > create mode 100644 src/nsinit.h > create mode 100644 src/nsinit.m > > diff --git a/configure.ac b/configure.ac > index 6c9b621..7f61344 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1892,7 +1892,7 @@ if test "${HAVE_NS}" = yes; then > INSTALL_ARCH_INDEP_EXTRA= > fi > > - NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o > $ns_fontfile" > + NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsinit.o > $ns_fontfile" > fi > CFLAGS="$tmp_CFLAGS" > CPPFLAGS="$tmp_CPPFLAGS" > @@ -5083,7 +5083,7 @@ case "$opsys" in > ## only costs about 1.5K of wasted binary space. > headerpad_extra=1000 > if test "$HAVE_NS" = "yes"; then > - libs_nsgui="-framework AppKit" > + libs_nsgui="-framework AppKit -framework Foundation" > if test "$NS_IMPL_COCOA" = "yes"; then > libs_nsgui="$libs_nsgui -framework IOKit" > fi > diff --git a/src/emacs.c b/src/emacs.c > index b1b2170..9473bcd 100644 > --- a/src/emacs.c > +++ b/src/emacs.c > @@ -56,6 +56,10 @@ along with GNU Emacs. If not, see < > http://www.gnu.org/licenses/>. */ > #include > #endif > > +#ifdef HAVE_NS > +#include "nsinit.h" > +#endif > + > #ifdef HAVE_WINDOW_SYSTEM > #include TERM_HEADER > #endif /* HAVE_WINDOW_SYSTEM */ > @@ -1371,6 +1375,10 @@ Using an Emacs configured with > --with-x-toolkit=lucid does not have this problem > init_ntproc (dumping); /* must precede init_editfns. */ > #endif > > +#ifdef HAVE_NS > + init_environment(); > +#endif > + > /* Initialize and GC-protect Vinitial_environment and > Vprocess_environment before set_initial_environment fills them > in. */ > diff --git a/src/nsinit.h b/src/nsinit.h > new file mode 100644 > index 0000000..41b79c8 > --- /dev/null > +++ b/src/nsinit.h > @@ -0,0 +1,20 @@ > +/* Definitions for initialising NeXT/Open/GNUstep environment > + Copyright (C) 2016 Free Software Foundation, > + Inc. > + > +This file is part of GNU Emacs. > + > +GNU Emacs is free software: you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation, either version 3 of the License, or > +(at your option) any later version. > + > +GNU Emacs is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +GNU General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with GNU Emacs. If not, see . */ > + > +void init_environment (void); > diff --git a/src/nsinit.m b/src/nsinit.m > new file mode 100644 > index 0000000..32281a6 > --- /dev/null > +++ b/src/nsinit.m > @@ -0,0 +1,33 @@ > +/* NeXT/Open/GNUstep / MacOSX initialisation functions. -*- coding: > utf-8 -*- > + > +Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2016 Free Software > +Foundation, Inc. > + > +This file is part of GNU Emacs. > + > +GNU Emacs is free software: you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation, either version 3 of the License, or > +(at your option) any later version. > + > +GNU Emacs is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +GNU General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with GNU Emacs. If not, see . */ > + > +#include > +#include > + > +/* Set up the environment in cases where Emacs has been run from the > + GUI and therefore has missing environment variables. */ > +void > +init_environment (void) > +{ > + const char * locale = [[[NSLocale currentLocale] localeIdentifier] > UTF8String]; > + > + /* Set LANG to locale, but not if LANG is already set. */ > + setenv("LANG", locale, 0); > +} > -- > 2.5.4 (Apple Git-61) > > > > > -- > Alan Third > > --001a114406ea05dc35052a3764f5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

This sounds like a good change. Unf= ortunately, I can't answer the locale-questions you raised in the mail.= However, I have a few small questions:

* Why a se= parate source file? Is there any technical reasons why this couldn't re= side in, say, nsterm.m?

* Can you add a "NSTR= ACE" line to the function, so that it's clear when this function i= s called, when NSTRACE is enabled.

* Have you cons= idered populating `process-environment' instead of setting LANG in the = Emacs process? Would there be any advantages/disadvantages with this approa= ch?

=C2=A0 =C2=A0 -- Anders Lindgren

On Mon, Jan 25, 201= 6 at 11:18 PM, Alan Third <alan@idiocy.org> wrote:
I've raised a bug (bug#22392) about Emacs on OS = X not setting the locale
and character encodings when launched from the GUI (finder, spotlight,
etc.). As far as I can tell it's because Emacs looks at LC_ALL, LC_TYPE=
and LANG for the locale information, but it's not set when launched fro= m
the GUI. It IS set in terminal.app, so if you launch from there it all
looks good.

Apparently the Windows version has the same problem and sorts it by
setting LANG from a function called early in in main in emacs.c.

I've written a patch that copies this method. It calls the NextStep
function for getting the locale and then sets LANG if it's not already<= br> set. I'm not sure that's it's the best way of doing it. I had t= o create
a new Objective C file and header to include in emacs.c.

There was also a question raised about what the correct character
encodings are for OS X. On my machine it sets LANG to en_GB and most of
the character encodings to iso-latin-1-unix, which looks OK to me, but
it was suggested that they should be UTF-8.

Does anyone know what the correct encodings are on OS X?


From 85d5d2f0213e052d1eccb6dc9e00f090b894ef90 Mon Sep 17 00:00:00 2001<= br> From: Alan Third <alan@idiocy.org= >
Date: Sun, 17 Jan 2016 13:56:12 +0000
Subject: [PATCH] Set locale when run from OS X GUI

* conf= igure.ac: Add nsinit.o to NS_OBJC_OBJ and link the Foundation
framework.
* src/emacs.c (main): Include nsinit.h and run init_environment.
* src/nsinit.c (init_environment): Get locale from OS and set LANG.
* src/nsinit.h: header for including nsinit.c.
---
=C2=A0= configure.ac |=C2=A0 4 ++--
=C2=A0src/emacs.c=C2=A0 |=C2=A0 8 ++++++++
=C2=A0src/nsinit.h | 20 ++++++++++++++++++++
=C2=A0src/nsinit.m | 33 +++++++++++++++++++++++++++++++++
=C2=A04 files changed, 63 insertions(+), 2 deletions(-)
=C2=A0create mode 100644 src/nsinit.h
=C2=A0create mode 100644 src/nsinit.m

diff --git a/configure.ac b/configure.ac
index 6c9b621..7f61344 100644
--- a/= configure.ac
+++ b/= configure.ac
@@ -1892,7 +1892,7 @@ if test "${HAVE_NS}" =3D yes; then
=C2=A0 =C2=A0 =C2=A0 INSTALL_ARCH_INDEP_EXTRA=3D
=C2=A0 =C2=A0fi

-=C2=A0 NS_OBJC_OBJ=3D"nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o = $ns_fontfile"
+=C2=A0 NS_OBJC_OBJ=3D"nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o = nsinit.o $ns_fontfile"
=C2=A0fi
=C2=A0CFLAGS=3D"$tmp_CFLAGS"
=C2=A0CPPFLAGS=3D"$tmp_CPPFLAGS"
@@ -5083,7 +5083,7 @@ case "$opsys" in
=C2=A0 =C2=A0 ## only costs about 1.5K of wasted binary space.
=C2=A0 =C2=A0 headerpad_extra=3D1000
=C2=A0 =C2=A0 if test "$HAVE_NS" =3D "yes"; then
-=C2=A0 =C2=A0 =C2=A0libs_nsgui=3D"-framework AppKit"
+=C2=A0 =C2=A0 =C2=A0libs_nsgui=3D"-framework AppKit -framework Founda= tion"
=C2=A0 =C2=A0 =C2=A0 if test "$NS_IMPL_COCOA" =3D "yes"= ; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0libs_nsgui=3D"$libs_nsgui -framework= IOKit"
=C2=A0 =C2=A0 =C2=A0 fi
diff --git a/src/emacs.c b/src/emacs.c
index b1b2170..9473bcd 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -56,6 +56,10 @@ along with GNU Emacs.=C2=A0 If not, see <http://ww= w.gnu.org/licenses/>.=C2=A0 */
=C2=A0#include <binary-io.h>
=C2=A0#endif

+#ifdef HAVE_NS
+#include "nsinit.h"
+#endif
+
=C2=A0#ifdef HAVE_WINDOW_SYSTEM
=C2=A0#include TERM_HEADER
=C2=A0#endif /* HAVE_WINDOW_SYSTEM */
@@ -1371,6 +1375,10 @@ Using an Emacs configured with --with-x-toolkit=3Dlu= cid does not have this problem
=C2=A0 =C2=A0init_ntproc (dumping); /* must precede init_editfns.=C2=A0 */<= br> =C2=A0#endif

+#ifdef HAVE_NS
+=C2=A0 init_environment();
+#endif
+
=C2=A0 =C2=A0/* Initialize and GC-protect Vinitial_environment and
=C2=A0 =C2=A0 =C2=A0 Vprocess_environment before set_initial_environment fi= lls them
=C2=A0 =C2=A0 =C2=A0 in.=C2=A0 */
diff --git a/src/nsinit.h b/src/nsinit.h
new file mode 100644
index 0000000..41b79c8
--- /dev/null
+++ b/src/nsinit.h
@@ -0,0 +1,20 @@
+/* Definitions for initialising NeXT/Open/GNUstep environment
+=C2=A0 =C2=A0Copyright (C) 2016 Free Software Foundation,
+=C2=A0 =C2=A0Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.=C2=A0 If not, see <http://www.gnu.org/licenses= />.=C2=A0 */
+
+void init_environment (void);
diff --git a/src/nsinit.m b/src/nsinit.m
new file mode 100644
index 0000000..32281a6
--- /dev/null
+++ b/src/nsinit.m
@@ -0,0 +1,33 @@
+/* NeXT/Open/GNUstep / MacOSX initialisation functions.=C2=A0 =C2=A0 =C2= =A0 -*- coding: utf-8 -*-
+
+Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2016 Free Software
+Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.=C2=A0 If not, see <http://www.gnu.org/licenses= />.=C2=A0 */
+
+#include <config.h>
+#include <Foundation/Foundation.h>
+
+/* Set up the environment in cases where Emacs has been run from the
+=C2=A0 =C2=A0GUI and therefore has missing environment variables. */
+void
+init_environment (void)
+{
+=C2=A0 =C2=A0 const char * locale =3D [[[NSLocale currentLocale] localeIde= ntifier] UTF8String];
+
+=C2=A0 =C2=A0 /* Set LANG to locale, but not if LANG is already set. */ +=C2=A0 =C2=A0 setenv("LANG", locale, 0);
+}
--
2.5.4 (Apple Git-61)




--
Alan Third


--001a114406ea05dc35052a3764f5-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 14:45: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: To: Anders Lindgren Cc: 22392@debbugs.gnu.org, alan@idiocy.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145381946231194 (code B ref 22392); Tue, 26 Jan 2016 14:45:02 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 14:44:22 +0000 Received: from localhost ([127.0.0.1]:36740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO4r0-000874-7K for submit@debbugs.gnu.org; Tue, 26 Jan 2016 09:44:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59016) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO4qz-00086r-86 for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 09:44:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO4qt-0005Pj-Gx for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 09:44:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO4qo-0005Oq-LI; Tue, 26 Jan 2016 09:44:10 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1328 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aO4qn-0007Qv-HU; Tue, 26 Jan 2016 09:44:10 -0500 Date: Tue, 26 Jan 2016 16:44:38 +0200 Message-Id: <83twm01ju1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Anders Lindgren on Tue, 26 Jan 2016 08:11:13 +0100) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 26 Jan 2016 08:11:13 +0100 > From: Anders Lindgren > Cc: 22392@debbugs.gnu.org, emacs-devel > > * Have you considered populating `process-environment' instead of setting LANG > in the Emacs process? Would there be any advantages/disadvantages with this > approach? process-environment gets passed to child processes, right? From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 15:07:01 +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: To: Eli Zaretskii Cc: 22392@debbugs.gnu.org, Alan Third , emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14538208051817 (code B ref 22392); Tue, 26 Jan 2016 15:07:01 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 15:06:45 +0000 Received: from localhost ([127.0.0.1]:37769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO5Cf-0000TF-1U for submit@debbugs.gnu.org; Tue, 26 Jan 2016 10:06:45 -0500 Received: from mail-vk0-f42.google.com ([209.85.213.42]:33039) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO5Cd-0000T3-Uy for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 10:06:44 -0500 Received: by mail-vk0-f42.google.com with SMTP id e64so93948768vkg.0 for <22392@debbugs.gnu.org>; Tue, 26 Jan 2016 07:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JbJ3vf3wPeGkIH3vXUyW6ZEQVrdD6EwL1wfZwz3pt/w=; b=PpJtYU906FMi+B5Iu6hNIU2ZkhaMTrYk79McXukHchbz5LzVJ56fwlxZ34SOhLSW6f EOF3paKzeTrz4d3vTVFmKl92K8qwDsKnuW8LGKehB7ac87uRIleUJdhpTlO8zCmjftma x0elGr0Rx5/8qD/C+Opnn825oBWLDe//utOUauLVK4iEO0cfOPvMV8vK5TUwCKdgjW7V CLebXkyjk7EoG7AP/EaULJPnAb5jL4lsaKr7NIURzwVDa+W6JiHk7vDOD3tw8TTJnBBh d2tZx+BZT5n4Ekib1tO2uIjriVOTz/vVsEoItsYGo4su6MAiLSQPTwj1ecjlPfcOc90w NRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=JbJ3vf3wPeGkIH3vXUyW6ZEQVrdD6EwL1wfZwz3pt/w=; b=e5yfJ/Z8vfMrj5ox/bUAAXQUq8fMnJJRhbdfHVBCnTdCryS0iSAI8Jrvk6uR8TF+Jt 30sQQGZmhX20ZFymJ5FOY+AhSEUnraUjTPXiH1PbZdvw669tJmV8xssd6WJS0uhFIdpi 7TN+VzdVU0GNiIWL+JS4X4dOo9aq/MTHQOwL0iMRB43S+uXdBiTH/GLDOzYAdqj3k9dk jl6cOPc2ke2t/niBJeQj4EYNBGiee+lpiPpu6AxhBL3PSwTdhmvR1EDbygMfHDFZfpoF LE98iwinToNiNIrxVdCxEmDvUhQdifmDEGGtg2KJmgpljAQiToRT5imiH5KRyNysG2i4 gT4w== X-Gm-Message-State: AG10YOQB6z/XkAhZeqcvg+GiPdzXIuyRWlOVkisdTPuiFUg4hxcJSXY6rfg7mJ6fplYkzikgSG1Qqe2EccEPKw== MIME-Version: 1.0 X-Received: by 10.31.56.140 with SMTP id f134mr15033014vka.23.1453820798553; Tue, 26 Jan 2016 07:06:38 -0800 (PST) Received: by 10.31.214.131 with HTTP; Tue, 26 Jan 2016 07:06:38 -0800 (PST) In-Reply-To: <83twm01ju1.fsf@gnu.org> References: <83twm01ju1.fsf@gnu.org> Date: Tue, 26 Jan 2016 16:06:38 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a1143f0cc43d43b052a3e08c9 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1143f0cc43d43b052a3e08c9 Content-Type: text/plain; charset=UTF-8 On Tue, Jan 26, 2016 at 3:44 PM, Eli Zaretskii wrote: > > * Have you considered populating `process-environment' instead of > setting LANG > > in the Emacs process? Would there be any advantages/disadvantages with > this > > approach? > > process-environment gets passed to child processes, right? > Yes, that is why I asked if he had considered that approach. The reason I asked was if there was any advantage in setting the LANG variable of the Emacs process itself, or if this only was of interest of subprocesses. -- Anders --001a1143f0cc43d43b052a3e08c9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Jan 26, 2016 at 3:44 PM, Eli Zaretskii <eliz@gnu.org>= wrote:
> * Have you = considered populating `process-environment' instead of setting LANG
> in the Emacs process? Would there be any advantages/disadvantages with= this
> approach?

process-environment gets passed to child processes, right?

Yes, that is why I asked if he had considered th= at approach. The reason I asked was if there was any advantage in setting t= he LANG variable of the Emacs process itself, or if this only was of intere= st of subprocesses.

=C2=A0 =C2=A0 -- Anders
<= div>
--001a1143f0cc43d43b052a3e08c9-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 15:15: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: To: Anders Lindgren Cc: 22392@debbugs.gnu.org, alan@idiocy.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14538212652488 (code B ref 22392); Tue, 26 Jan 2016 15:15:02 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 15:14:25 +0000 Received: from localhost ([127.0.0.1]:37774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO5K5-0000e4-1A for submit@debbugs.gnu.org; Tue, 26 Jan 2016 10:14:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44477) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO5K3-0000ds-I1 for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 10:14:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO5Jx-0006xE-Cj for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 10:14:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO5JT-0006ke-1E; Tue, 26 Jan 2016 10:13:47 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1341 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aO5JS-0008LT-9q; Tue, 26 Jan 2016 10:13:46 -0500 Date: Tue, 26 Jan 2016 17:14:15 +0200 Message-Id: <83lh7c1igo.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Anders Lindgren on Tue, 26 Jan 2016 16:06:38 +0100) References: <83twm01ju1.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 26 Jan 2016 16:06:38 +0100 > From: Anders Lindgren > Cc: 22392@debbugs.gnu.org, Alan Third , > emacs-devel > > > * Have you considered populating `process-environment' instead of setting > LANG > > in the Emacs process? Would there be any advantages/disadvantages with > this > > approach? > > process-environment gets passed to child processes, right? > > > Yes, that is why I asked if he had considered that approach. The reason I asked > was if there was any advantage in setting the LANG variable of the Emacs > process itself, or if this only was of interest of subprocesses. Passing our LANG to subprocesses would be a bad idea, I think. Emacs is not supposed to change the environment of the child processes just because it needs that for itself. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 16:59:01 +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: To: Eli Zaretskii Cc: 22392@debbugs.gnu.org, Alan Third , emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145382751112202 (code B ref 22392); Tue, 26 Jan 2016 16:59:01 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 16:58:31 +0000 Received: from localhost ([127.0.0.1]:37852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO6wp-0003Ak-AV for submit@debbugs.gnu.org; Tue, 26 Jan 2016 11:58:31 -0500 Received: from mail-vk0-f54.google.com ([209.85.213.54]:33832) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO6wo-0003AY-1B for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 11:58:30 -0500 Received: by mail-vk0-f54.google.com with SMTP id e185so95147722vkb.1 for <22392@debbugs.gnu.org>; Tue, 26 Jan 2016 08:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=H8RsTnYXykUKU4IQQjuyL5y+r3rECKcppgKgzH7X/x0=; b=AiJ57Uhuaw14NuV9svYvVsz+U/HMpsAROpq2T2RUwms2VWMt/pOmY6gQ9qnmYBiV4Z z9R3UD6vOT0I7KPQXgbv14qdQkteDQR1vq9AH0+lq0yKkOLaR8mrVmxoZk7JYKNUHXiD 3LmRpxiZDt2RnkPfh3bl9vLpxiClZ/0xvsHhBW3Y7+HcSz5Nd2txlWFFEjjd4VRoziD0 iAGCc5RI+gyNxTeY+y0omounA2VJbq5WXu5DZCJQnbJDQ4022tPh5Jx86rR8RosvFigR Se2+X+gqDOj0jJ4Mhj5XCp93cn9Syynhrdor07JsY793xa46FHaN/gMd2v4jj9WcALXr VVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=H8RsTnYXykUKU4IQQjuyL5y+r3rECKcppgKgzH7X/x0=; b=Hu0sE9gsRq0Beaql+VEOFIDvXrAWTlflclkJXj4Odq4tcX+pYoZUDbx2DQOXp64GmV T1dnVAymh+IljdsYmWGcY1WzWEKPPorDCuuz+pmFFfXqaPbQlIotcvwar6b88y1em5YQ M3hMlCeubpnXpsTCOqL5/BrF1p3Xiw8rnlP4aADAA+553aKBktaPNo+TvTXcVKm9qjsk T78McRxubYdc6gX+0BlkHREy2/rd7fOgqpoxBffiJdraun0/aN6IKvDrlamFDSUpWBd0 6UMHWUt3IsPuZcQi6VltjcSLE4881ysl1M/Bui5FQZq4rRZDNKhWmN1MEvgHWp16vVDt kkuQ== X-Gm-Message-State: AG10YOTHcYcjeoU8crd5Nx4HkCv6kwhRH2QPtADMTG1i7B9BAxQ/FcBBPOx24w9yosB7/zgH6u21Waz/obVBGg== MIME-Version: 1.0 X-Received: by 10.31.138.73 with SMTP id m70mr15144026vkd.70.1453827504371; Tue, 26 Jan 2016 08:58:24 -0800 (PST) Received: by 10.31.214.131 with HTTP; Tue, 26 Jan 2016 08:58:24 -0800 (PST) In-Reply-To: <83lh7c1igo.fsf@gnu.org> References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> Date: Tue, 26 Jan 2016 17:58:24 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a1143dd18f67d85052a3f978a X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1143dd18f67d85052a3f978a Content-Type: text/plain; charset=UTF-8 > > > Yes, that is why I asked if he had considered that approach. The reason > I asked > > was if there was any advantage in setting the LANG variable of the Emacs > > process itself, or if this only was of interest of subprocesses. > > Passing our LANG to subprocesses would be a bad idea, I think. Emacs > is not supposed to change the environment of the child processes just > because it needs that for itself. > My mistake. I though the whole point was to set it for subprocesses (for example, to make "ls" sort file names in the right order). Reading the post again, I realise that this is not the case. -- Anders --001a1143dd18f67d85052a3f978a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> Yes, that is why I asked i= f he had considered that approach. The reason I asked
> was if there was any advantage in setting the LANG variable of the Ema= cs
> process itself, or if this only was of interest of subprocesses.

Passing our LANG to subprocesses would be a bad idea, I think.=C2=A0= Emacs
is not supposed to change the environment of the child processes just
because it needs that for itself.

My mi= stake. I though the whole point was to set it for subprocesses (for example= , to make "ls" sort file names in the right order). Reading the p= ost again, I realise that this is not the case.

= =C2=A0 =C2=A0 -- Anders

--001a1143dd18f67d85052a3f978a-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 22:51: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: To: Anders Lindgren Cc: 22392@debbugs.gnu.org, emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145384865013118 (code B ref 22392); Tue, 26 Jan 2016 22:51:02 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 22:50:50 +0000 Received: from localhost ([127.0.0.1]:37962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOCRl-0003PW-O2 for submit@debbugs.gnu.org; Tue, 26 Jan 2016 17:50:49 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35432) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOCRk-0003P5-KZ for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 17:50:48 -0500 Received: by mail-wm0-f48.google.com with SMTP id r129so124192237wmr.0 for <22392@debbugs.gnu.org>; Tue, 26 Jan 2016 14:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=19KVaVcTXWy/B2MhAnqefnt1IQvsxJUy5QT/o3Z4MO0=; b=gsSeD0GW1L6B7lrKMjlf0Xj/uUYJoyfhMFMXqVG6zO1fxe6hAgm8SI1HNuqMWl3tqJ YqqkLoeIUQ0ZVSofreVIFXLMhj5A5DuHwOtOh+VkpY1uKDraWTFHcn62KIrdmwRGPXXP JP8nk/EKkLVeSukeNFuLTAPWSSjXpWPPlS00wsaEc9r9mVpiXma/TMBLAu2pr4C2G+si ErKljQWkCKkQZgQICbfnV4/LHiDAp680fayS23nCYAL+vubIoKhjsKsXNo/sTxgAqbGI rbG08IFhuQ71/xJAanVL3d07Tsrv1oovVY6UyJ9SiMt3cnYqUk5MVT8tuEs/w2N45VOt YQ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=19KVaVcTXWy/B2MhAnqefnt1IQvsxJUy5QT/o3Z4MO0=; b=XwQB6BtBQ5sS05ZskHwp+mgXXAdSY8KS0TqasQXs2bzI+nLGvFxzKjrQTvFk2OwYkK +vjk0kRF/CkiYp8HRODH3369fBhlkcPbRFnM/ChSi1HHCUesXzf0ks51qocDpbHG3OzL MVPSSfJUpC02VwKPyVZqweUpx42IGyBSkDn6T4FJr+fboeo1JDlfKdmzAfkXBeD98XqE iIUGtIN2spy59/4FyladkxtQuq1YrBDtDcye1XuSmg9iTY5GBrzcJKzXH2Wb1/e22pow YYBfNZOj4grpuQB0k6zupVrMhIC5MQV4fEoeHi7OxhgLZ1OBcqcyRGtbreF7WD6gGDIC Q37Q== X-Gm-Message-State: AG10YOSasvKAlCgUCfM4QmCDzq5AdmFm4C+cz2KqR6yeuJ77+iB9YIwDh9CwD4Yas2M/tA== X-Received: by 10.194.117.134 with SMTP id ke6mr29306712wjb.94.1453848642757; Tue, 26 Jan 2016 14:50:42 -0800 (PST) Received: from galloway.idiocy.org (d.d.f.f.d.4.a.0.9.0.6.7.a.3.d.a.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:ad3a:7609:a4d:ffdd]) by smtp.gmail.com with ESMTPSA id x6sm3380311wje.38.2016.01.26.14.50.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jan 2016 14:50:42 -0800 (PST) From: Alan Third References: Date: Tue, 26 Jan 2016 22:50:40 +0000 In-Reply-To: (Anders Lindgren's message of "Tue, 26 Jan 2016 08:11:13 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Anders Lindgren writes: > Hi, > > This sounds like a good change. Unfortunately, I can't answer the > locale-questions you raised in the mail. However, I have a few small > questions: > > * Why a separate source file? Is there any technical reasons why this > couldn't reside in, say, nsterm.m? No, I just wasn't sure what the deal was with including files like that in emacs.c since there's quite a lot in it. If that's an acceptable way to do it then I'd be happy to do so. > * Can you add a "NSTRACE" line to the function, so that it's clear > when this function is called, when NSTRACE is enabled. I don't know what that means, but I'll look into it. > * Have you considered populating `process-environment' instead of > setting LANG in the Emacs process? Would there be any > advantages/disadvantages with this approach? The problem is that Emacs itself doesn't know what the correct locale is and therefore sets various encodings and things to "nil". As far as I can tell process-environment is only for sub-processes, which doesn't solve this particular problem. -- Alan Third From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 23:06:01 +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: To: Eli Zaretskii Cc: 22392@debbugs.gnu.org, Anders Lindgren , emacs-devel@gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145384953914536 (code B ref 22392); Tue, 26 Jan 2016 23:06:01 +0000 Received: (at 22392) by debbugs.gnu.org; 26 Jan 2016 23:05:39 +0000 Received: from localhost ([127.0.0.1]:37970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOCg7-0003mO-9S for submit@debbugs.gnu.org; Tue, 26 Jan 2016 18:05:39 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38512) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOCg5-0003mA-Dh for 22392@debbugs.gnu.org; Tue, 26 Jan 2016 18:05:37 -0500 Received: by mail-wm0-f54.google.com with SMTP id p63so720949wmp.1 for <22392@debbugs.gnu.org>; Tue, 26 Jan 2016 15:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=nYYBgqY85ElzTGRgdJXgygpSCNFxi8To+YyWcb9U3ig=; b=Q/BOwJMiRz1aas0BAfFwxv5OMYIJgrKQAw5Kb6IsX6MEKuzaA0UiUEeyG8wBNWsokC iASt3gHgpq/UC17KTtPvQwVTurjFVis8h9395jPS7bNhQn0QCi4P9UlROubaVnO+2kpM aNfyRWDaYvtooFbdoo7w7ET/13zo9ptpbUyBiKE0tej5ubn5kR6G12reCCKslLYJNvxZ r4uUc4GCqS23WNIVzFXkwvcQoD/G3cEY2+XA3/wL6yzizQe7jV5bUCmY+a918gM8I40u 487z5/hq8+u8ylVeARho3x4xE94jXPrfvlyDLUCKPH3XYhxxAt85m8fUuh4S7rLZZ5R6 Ra1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=nYYBgqY85ElzTGRgdJXgygpSCNFxi8To+YyWcb9U3ig=; b=hPmSsGRR8tuB+IU1xfDZ+dS0F/7KuHJ0X2/LCA+tNq2mk8O4m0/2a4eX/CENM7xMum uGLrIcMfxarpfi2NHcT/xL265eUkHVh05Kb6uXzq9TJ3Uqit4Ik6Cpc82HLqefnP8QPE 4A9WDu/Nmj9xtmE6HroX868h5650G4/DxkT5ivn2DZz0va5BjRf4YSIWIrfx1Cdu08An WSGosc1KJxDEwnjCg/gAv9MrAxPH+ghHnKu8meL3w/GyHJzzVQalvCr3HejY3CYi9INn XwaGizo/pPwQUCGQwTA4e2/ENZ+1o1sD+156Li1auRvPTZbOqtD+7sqOL9qJdC1VCB7Q BBRA== X-Gm-Message-State: AG10YOTe6pDgEjn3JvMhVtekPGbvhUCkRSkWg30dLA+g+KA0gk8kgSaDJgRQ51vJd3fVBw== X-Received: by 10.194.95.34 with SMTP id dh2mr25013796wjb.63.1453849531936; Tue, 26 Jan 2016 15:05:31 -0800 (PST) Received: from galloway.idiocy.org (d.d.f.f.d.4.a.0.9.0.6.7.a.3.d.a.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:ad3a:7609:a4d:ffdd]) by smtp.gmail.com with ESMTPSA id k130sm4894915wmg.6.2016.01.26.15.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jan 2016 15:05:31 -0800 (PST) From: Alan Third References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> Date: Tue, 26 Jan 2016 23:05:29 +0000 In-Reply-To: <83lh7c1igo.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 Jan 2016 17:14:15 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: >> Yes, that is why I asked if he had considered that approach. The reason I asked >> was if there was any advantage in setting the LANG variable of the Emacs >> process itself, or if this only was of interest of subprocesses. > > Passing our LANG to subprocesses would be a bad idea, I think. Emacs > is not supposed to change the environment of the child processes just > because it needs that for itself. To my mind it might be a plus for Emacs to pass it's LANG along in this particular situation as UNIX style sub-processes aren't going to pick up the correct locale themselves and so will, presumably, default to "C", no matter what the locale should be. eg. running the locale command from within Emacs: LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= vs running it from terminal.app: LANG="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_CTYPE="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_ALL= -- Alan Third From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 06:22:01 +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: To: Alan Third Cc: 22392@debbugs.gnu.org, emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145387570922810 (code B ref 22392); Wed, 27 Jan 2016 06:22:01 +0000 Received: (at 22392) by debbugs.gnu.org; 27 Jan 2016 06:21:49 +0000 Received: from localhost ([127.0.0.1]:38023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOJUC-0005vp-R5 for submit@debbugs.gnu.org; Wed, 27 Jan 2016 01:21:49 -0500 Received: from mail-vk0-f51.google.com ([209.85.213.51]:33891) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOJUA-0005vc-UL for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 01:21:47 -0500 Received: by mail-vk0-f51.google.com with SMTP id e185so105165615vkb.1 for <22392@debbugs.gnu.org>; Tue, 26 Jan 2016 22:21:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xqEeLoGltrlwVLYYf4QbSWHZEvtgClfmUkF+oenzRE8=; b=piepn0AcSqEeVvgXllg56SLNFUUdzOJ3NHGPDO05S3h8OI4LZpi54GAdo4eKdrB1qS jQjrYYbKXdWX2XAZw/n9hCLZPyu13hQ1RJ/grMQgGj39rgovYXFg8/XaiTvVNX/hokRO hSsNaChioDFq7q5RVjsXiEw5HBC5OOsisMFai3HrrJB2b/iKnjrp836yufQqggQnezfV 4BzTZy+HXRHsxhuXk/0GmBHJgDGwFSAER1YVcryc1ft4mgvNcgGgs47DGfWVdggZSTUX J5G6pNvPsNLgGxuBK+J82VncSHqRfZWI4n7SQu/0PM4NTzAsbUE57ZI4B0e7zW1WTa8q oSSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xqEeLoGltrlwVLYYf4QbSWHZEvtgClfmUkF+oenzRE8=; b=IVwy7pY7iFKreADPmdFK/qoa/k29MVlgIr9H1xGHoXpKleazLhuxLHCUTG7ClobcdR R7wqCtGDn07ymWfG+JIrlUR6sJkkpMFnRj/27yvQSE2ut1nHG5AWg6EOWmcBhjf940xT 4yVuc2OwLhsKAXH0xDQHPyg16rYU6/TuugW2/div9ufKANnkaimD/MDB5irAcFwRr4s5 AsUmvLtF9XI8P5PWU0OvyRjTqNXUYxG9mptSTqSLCPj2Yv7kV6i1FyjbYh/yK847aNnX XAdohHEVGYiXejzky0ETT/uII3h/0L/+Y3NcSk0D191QyVHvvEguzjZfumOpA4KxwOS8 IxAQ== X-Gm-Message-State: AG10YOQAgM/zU2fd0KryGHlrZ/uNly/q/mNSXRA7BfZyqbXzrRNh5j6BKhiga5PSf8LILh97/CuhvxmvRkZ90Q== MIME-Version: 1.0 X-Received: by 10.31.173.18 with SMTP id w18mr15080807vke.31.1453875701467; Tue, 26 Jan 2016 22:21:41 -0800 (PST) Received: by 10.31.214.131 with HTTP; Tue, 26 Jan 2016 22:21:41 -0800 (PST) In-Reply-To: References: Date: Wed, 27 Jan 2016 07:21:41 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a1143f394bbd317052a4ad04c X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1143f394bbd317052a4ad04c Content-Type: text/plain; charset=UTF-8 > > > * Why a separate source file? Is there any technical reasons why this > > couldn't reside in, say, nsterm.m? > > No, I just wasn't sure what the deal was with including files like that > in emacs.c since there's quite a lot in it. If that's an acceptable way > to do it then I'd be happy to do so. > Ah, I see. Including "nsterm.h" from "emacs.c" sounds like a bad idea, as it would increase the rebuild times. In this case, introducing a new source file seems like the right choice. > > * Can you add a "NSTRACE" line to the function, so that it's clear > > when this function is called, when NSTRACE is enabled. > > I don't know what that means, but I'll look into it. > It's a simple printf-based macro that prints a call stack of all NS-related function calls. The resulting log looks like: nsterm.m : 1399: [ 70] x_make_frame_visible nsterm.m : 6569: [ 71] | [EmacsView windowDidBecomeKey] nsterm.m : 1360: [ 72] | | ns_frame_rehighlight nsterm.m : 2048: [ 73] | | | x_set_frame_alpha nsterm.m : 7775: [ 74] | [EmacsWindow constrainFrameRect:(X:0 Y:684)/(W:595 H:516) toScreen:] nsterm.m : 7123: [ 75] | | [EmacsView isFullscreen] ->> 0 Simply include "nsterm.h" and add the following line: NSTRACE ("init_environment"); You can enable tracing by uncommenting the line defining NSTRACE_ENABLED in nsterm.h. > * Have you considered populating `process-environment' instead of > > setting LANG in the Emacs process? Would there be any > > advantages/disadvantages with this approach? > > The problem is that Emacs itself doesn't know what the correct locale is > and therefore sets various encodings and things to "nil". As far as I > can tell process-environment is only for sub-processes, which doesn't > solve this particular problem. > OK, then setting "LANG" in the Emacs process is the correct way to do it. Thanks for finding and fixing this! -- Anders --001a1143f394bbd317052a4ad04c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> * Why a separate source file? Is there a= ny technical reasons why this
> couldn't reside in, say, nsterm.m?

No, I just wasn't sure what the deal was with including files li= ke that
in emacs.c since there's quite a lot in it. If that's an acceptable= way
to do it then I'd be happy to do so.

Ah, I see. Including "nsterm.h" from "emacs.c" sounds= like a bad idea, as it would increase the rebuild times. In this case, int= roducing a new source file seems like the right choice.

=C2=A0
> * Can you add a &q= uot;NSTRACE" line to the function, so that it's clear
> when this function is called, when NSTRACE is enabled.

I don't know what that means, but I'll look into it.

It's a simple printf-based macro that prin= ts a call stack of all NS-related function calls. The resulting log looks l= ike:

nsterm.m =C2=A0: 1399: [ =C2=A0 70] =C2=A0x_make_frame_visible
nsterm.m =C2=A0: 6569:= [ =C2=A0 71] =C2=A0| [EmacsView windowDidBecomeKey]
nsterm.m =C2=A0: 1360: [ =C2=A0 72] =C2=A0| = | ns_frame_rehighlight
nsterm.m =C2=A0: 2048: [ =C2=A0 73] =C2=A0| | | x_set_frame_alpha
nsterm.m =C2=A0: 7775: [ =C2= =A0 74] =C2=A0| [EmacsWindow constrainFrameRect:(X:0 Y:684)/(W:595 H:516) t= oScreen:]
nsterm.m =C2= =A0: 7123: [ =C2=A0 75] =C2=A0| | [EmacsView isFullscreen] ->> 0

Simply include "nsterm.h" and a= dd the following line:

=C2=A0 =C2=A0 =C2=A0 NSTRAC= E ("init_environment");

You can enable t= racing by uncommenting the line defining NSTRACE_ENABLED in nsterm.h.
=


> * Have you considered populating `process-environment' instead of<= br> > setting LANG in the Emacs process? Would there be any
> advantages/disadvantages with this approach?

The problem is that Emacs itself doesn't know what the correct l= ocale is
and therefore sets various encodings and things to "nil". As far = as I
can tell process-environment is only for sub-processes, which doesn't solve this particular problem.

OK, then= setting "LANG" in the Emacs process is the correct way to do it.=



Thanks for finding = and fixing this!

=C2=A0 =C2=A0 -- Anders

--001a1143f394bbd317052a4ad04c-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 15:53: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: To: Anders Lindgren Cc: 22392@debbugs.gnu.org, alan@idiocy.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145390996415877 (code B ref 22392); Wed, 27 Jan 2016 15:53:02 +0000 Received: (at 22392) by debbugs.gnu.org; 27 Jan 2016 15:52:44 +0000 Received: from localhost ([127.0.0.1]:38860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOSOi-000481-0f for submit@debbugs.gnu.org; Wed, 27 Jan 2016 10:52:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50871) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOSOh-00047p-95 for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 10:52:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOSOa-0005G4-QU for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 10:52:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOSOU-0005DV-93; Wed, 27 Jan 2016 10:52:30 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2001 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aOSOT-0006hJ-C1; Wed, 27 Jan 2016 10:52:29 -0500 Date: Wed, 27 Jan 2016 17:53:00 +0200 Message-Id: <83si1jyq77.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Anders Lindgren on Wed, 27 Jan 2016 07:21:41 +0100) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 27 Jan 2016 07:21:41 +0100 > From: Anders Lindgren > Cc: 22392@debbugs.gnu.org, emacs-devel > > > * Why a separate source file? Is there any technical reasons why this > > couldn't reside in, say, nsterm.m? > > No, I just wasn't sure what the deal was with including files like that > in emacs.c since there's quite a lot in it. If that's an acceptable way > to do it then I'd be happy to do so. > > Ah, I see. Including "nsterm.h" from "emacs.c" sounds like a bad idea, as it > would increase the rebuild times. Why is that? We already include nsterm.h in at least 2 other *.c files, so why would a third one matter so much? > In this case, introducing a new source file seems like the right > choice. I'd rather avoid a new file, especially as it's going to be very small. Thanks. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 18:07:01 +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: To: Alan Third , Eli Zaretskii Cc: 22392@debbugs.gnu.org, Anders Lindgren , emacs-devel@gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14539180163866 (code B ref 22392); Wed, 27 Jan 2016 18:07:01 +0000 Received: (at 22392) by debbugs.gnu.org; 27 Jan 2016 18:06:56 +0000 Received: from localhost ([127.0.0.1]:38934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOUUa-00010I-DG for submit@debbugs.gnu.org; Wed, 27 Jan 2016 13:06:56 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53034) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOUUY-000105-Bh for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 13:06:54 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E0548160724; Wed, 27 Jan 2016 10:06:46 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dutjiIXb_nhZ; Wed, 27 Jan 2016 10:06:46 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 086A8160D05; Wed, 27 Jan 2016 10:06:46 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1CnJ1sa-urt1; Wed, 27 Jan 2016 10:06:45 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id DADF5160724; Wed, 27 Jan 2016 10:06:45 -0800 (PST) References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <56A90735.7090508@cs.ucla.edu> Date: Wed, 27 Jan 2016 10:06:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 01/26/2016 03:05 PM, Alan Third wrote: > To my mind it might be a plus for Emacs to pass it's LANG along in this > particular situation Yes, this sounds right. We can think of it as OS X having a screwy way to specify the locale, for GUI-launched applications; it doesn't bother to specify LC_ALL etc. and expects the application to do that. So Emacs should do that at the start, as if the user had done it before launching Emacs. I looked around, and it appears the GnuCash ran into a similar problem. You might want to look at its solution, in: https://github.com/Gnucash/gnucash/blob/master/src/bin/gnucash-bin.c From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 19:45:01 +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: To: Paul Eggert Cc: 22392@debbugs.gnu.org, alan@idiocy.org, andlind@gmail.com, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145392387012475 (code B ref 22392); Wed, 27 Jan 2016 19:45:01 +0000 Received: (at 22392) by debbugs.gnu.org; 27 Jan 2016 19:44:30 +0000 Received: from localhost ([127.0.0.1]:38956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOW0z-0003F9-QU for submit@debbugs.gnu.org; Wed, 27 Jan 2016 14:44:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33329) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOW0x-0003Er-Gf for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 14:44:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOW0r-0003BF-Ef for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 14:44:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOW0l-0003Ah-VI; Wed, 27 Jan 2016 14:44:15 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2215 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aOW0k-00013Y-Ud; Wed, 27 Jan 2016 14:44:15 -0500 Date: Wed, 27 Jan 2016 21:44:46 +0200 Message-Id: <83fuxizu1d.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <56A90735.7090508@cs.ucla.edu> (message from Paul Eggert on Wed, 27 Jan 2016 10:06:45 -0800) References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22392@debbugs.gnu.org, Anders Lindgren , > emacs-devel@gnu.org > From: Paul Eggert > Date: Wed, 27 Jan 2016 10:06:45 -0800 > > On 01/26/2016 03:05 PM, Alan Third wrote: > > To my mind it might be a plus for Emacs to pass it's LANG along in this > > particular situation > > Yes, this sounds right. I think passing that LANG to subprocesses will cause bug reports. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 22:28:01 +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: To: Eli Zaretskii Cc: 22392@debbugs.gnu.org, alan@idiocy.org, andlind@gmail.com, emacs-devel@gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145393363827353 (code B ref 22392); Wed, 27 Jan 2016 22:28:01 +0000 Received: (at 22392) by debbugs.gnu.org; 27 Jan 2016 22:27:18 +0000 Received: from localhost ([127.0.0.1]:39002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYYY-000777-9w for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:27:18 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41015) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYYW-00076r-KE for 22392@debbugs.gnu.org; Wed, 27 Jan 2016 17:27:17 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B03F4160D05; Wed, 27 Jan 2016 14:27:10 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Wdl4wCBKQooV; Wed, 27 Jan 2016 14:27:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0FACA160E15; Wed, 27 Jan 2016 14:27:10 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EG42BY09dkKi; Wed, 27 Jan 2016 14:27:09 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E81C6160819; Wed, 27 Jan 2016 14:27:09 -0800 (PST) References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> <83fuxizu1d.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <56A9443D.80605@cs.ucla.edu> Date: Wed, 27 Jan 2016 14:27:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <83fuxizu1d.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 01/27/2016 11:44 AM, Eli Zaretskii wrote: > I think passing that LANG to subprocesses will cause bug reports. > Quite possibly, yes. However, my guess is that it will cause fewer bug reports than what Emacs is doing now. Under MS-Windows, w32.c's init_environment sets LANG if not already set, so there is some precedent for OS X doing something similar. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jan 2016 22:54:01 +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: To: Paul Eggert Cc: 22392@debbugs.gnu.org, Eli Zaretskii , Anders Lindgren , emacs-devel@gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145402162617797 (code B ref 22392); Thu, 28 Jan 2016 22:54:01 +0000 Received: (at 22392) by debbugs.gnu.org; 28 Jan 2016 22:53:46 +0000 Received: from localhost ([127.0.0.1]:40110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOvRi-0004cz-6g for submit@debbugs.gnu.org; Thu, 28 Jan 2016 17:53:46 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36280) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOvRf-0004cm-Ta for 22392@debbugs.gnu.org; Thu, 28 Jan 2016 17:53:44 -0500 Received: by mail-wm0-f50.google.com with SMTP id p63so45658883wmp.1 for <22392@debbugs.gnu.org>; Thu, 28 Jan 2016 14:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=gbmWZpN4a8KEdH9PrPTzBL/Dg6BCTGF69JXmQ82OBoM=; b=JKcaGgdpZnZKQ5o/4q8hqFapxB2hdFQ7m+MW5XFmfp+P49++l22R2aJ7oEl3vBO9my MvGoJ0xOCpwOKadhUuUIwD/gqisyYFblcQEBukjwZ19GwwlAkr3zZnS61IAuJyZJ3dpk q/EfXMQEjFAZ0ctmN6Ds8JxBwYhS9PYf99rWqd5yXKPItFV+Pw7XqlKQ8dbLFyjem0kO q1kQx4Ct73LFSmSdu2fa8NJY4ao+/l/M0wfY+u4tciTv6hLVsH7c3xHS7Elp1X4diYcH DF9pQuWkk+M6WNLGuMva/BOqLRPGJM47C1kvM4XXBisxLAChhlLXnBmp3fwpChN5Rbho GwFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=gbmWZpN4a8KEdH9PrPTzBL/Dg6BCTGF69JXmQ82OBoM=; b=Yvx8BUgA/PxkNaRuRO/uXYe5BvGiUi8Kcesmrk2hMwJ86P2xQIuUBCI2M2ZuLQkf5b y8JylI9J9UehK86fZKyWOsHTTiQjiuxjzZ0jVRaxp+aq9VMkEcb+Ou0wWsTSfZVLciZ4 LyC82ZHQEsLEzohJ5ssKsVadS1XXgHeipRrhJ0P4RbweQ7iOxtXyPfWnKMYxL0tRINpP 3RjpukLZlpH2VuYfbBiP1xuJ7+IPornHwNNeN23FdKpap588jDeLU8czem0kTNVFtsXm URXfaiHnfI6cY0YjzDF4J4jw3QPDEKnjTa79fGh3Z9TgycU26YVK7IiKCglFDtPngcip yeyw== X-Gm-Message-State: AG10YOQe98vBrZCUG3p+HuS8Uaiq2hiSj0HFMGvhwyIipwG6BsoWix0Un6w9NL9d2tlhIw== X-Received: by 10.28.180.10 with SMTP id d10mr5945493wmf.14.1454021618141; Thu, 28 Jan 2016 14:53:38 -0800 (PST) Received: from galloway.idiocy.org (c.b.6.1.e.1.d.8.5.4.1.0.f.a.8.c.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:c8af:145:8d1e:16bc]) by smtp.gmail.com with ESMTPSA id m206sm4824236wmf.16.2016.01.28.14.53.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 14:53:36 -0800 (PST) From: Alan Third References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> Date: Thu, 28 Jan 2016 22:53:34 +0000 In-Reply-To: <56A90735.7090508@cs.ucla.edu> (Paul Eggert's message of "Wed, 27 Jan 2016 10:06:45 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --=-=-= Content-Type: text/plain Paul Eggert writes: > On 01/26/2016 03:05 PM, Alan Third wrote: > > I looked around, and it appears the GnuCash ran into a similar > problem. You might want to look at its solution, in: > > https://github.com/Gnucash/gnucash/blob/master/src/bin/gnucash-bin.c I've had a look at that code and was initially worried at how much more they have than I'd written, but I'm pretty sure that most of their code is doing things that are done by mule in emacs. One thing I don't understand is that they're building up the locale value from the two parts (language and country code) when NSLocale provides a function that does that for you. Makes me wonder if they know something I don't. They've also wrapped that bit of code in a try/catch as someone was apparently getting a crash due to not having the country code set. I can't replicate this, the only way I've found through Google is by using XCode to unset the user's locale, and we don't use XCode. I've put in a try/catch anyway, just in case. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Set-locale-when-run-from-OS-X-GUI.patch Content-Description: OS X Locale fix >From b96c97cb16a980243389c01c10c5ab232fe6827e Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 28 Jan 2016 21:42:04 +0000 Subject: [PATCH] Set locale when run from OS X GUI * src/emacs.c (main): Call ns_init_locale. * src/nsterm.m (ns_init_locale): Get locale from OS and set LANG. * src/nsterm.h: Include ns_init_locale. --- src/emacs.c | 5 +++++ src/nsterm.h | 2 ++ src/nsterm.m | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index aaf058e..10e81d5 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1378,6 +1378,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_ntproc (dumping); /* must precede init_editfns. */ #endif +#ifdef HAVE_NS + /* Initialise the locale from user defaults. */ + ns_init_locale(); +#endif + /* Initialize and GC-protect Vinitial_environment and Vprocess_environment before set_initial_environment fills them in. */ diff --git a/src/nsterm.h b/src/nsterm.h index 6ca584e..fa5399c 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1141,6 +1141,8 @@ extern void ns_retain_object (void *obj); extern void *ns_alloc_autorelease_pool (void); extern void ns_release_autorelease_pool (void *); extern const char *ns_get_defaults_value (const char *key); +extern void ns_init_locale (void); + /* in nsmenu */ extern void update_frame_tool_bar (struct frame *f); diff --git a/src/nsterm.m b/src/nsterm.m index b270e0e..4b04fd5 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -586,6 +586,27 @@ ns_load_path (void) void +ns_init_locale (void) +/* OS X doesn't set any environment variables for the locale when run + from the GUI. Get the locale from the OS and set LANG. */ +{ + NSLocale *locale = [NSLocale currentLocale]; + + NSTRACE ("ns_init_locale"); + + @try + { + /* Set LANG to locale, but not if LANG is already set. */ + setenv("LANG", [[locale localeIdentifier] UTF8String], 0); + } + @catch (NSException *e) + { + NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); + } +} + + +void ns_release_object (void *obj) /* -------------------------------------------------------------------------- Release an object (callable from C) -- 2.5.4 (Apple Git-61) --=-=-= Content-Type: text/plain -- Alan Third --=-=-=-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale In-Reply-To: Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jan 2016 06:14:01 +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: To: 22392@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145413443114439 (code B ref -1); Sat, 30 Jan 2016 06:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jan 2016 06:13:51 +0000 Received: from localhost ([127.0.0.1]:40963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPOn8-0003kp-PD for submit@debbugs.gnu.org; Sat, 30 Jan 2016 01:13:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49871) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPOn7-0003kc-3q for submit@debbugs.gnu.org; Sat, 30 Jan 2016 01:13:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPOn0-0004sn-Pf for submit@debbugs.gnu.org; Sat, 30 Jan 2016 01:13:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPOn0-0004si-MF for submit@debbugs.gnu.org; Sat, 30 Jan 2016 01:13:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPOmz-00081v-Pm for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 01:13:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPOmw-0004s0-KO for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 01:13:41 -0500 Received: from plane.gmane.org ([80.91.229.3]:35206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPOmw-0004rk-DH for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 01:13:38 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aPOmt-0004JK-4M for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 07:13:35 +0100 Received: from c-68-39-93-111.hsd1.in.comcast.net ([68.39.93.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Jan 2016 07:13:35 +0100 Received: from random832 by c-68-39-93-111.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Jan 2016 07:13:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Random832 Date: Sat, 30 Jan 2016 01:13:27 -0500 Lines: 9 Message-ID: References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508__41861.8593867452$1453918242$gmane$org@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-93-111.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:yULa4YuJON3VXrr5ETa9V60RgdU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) Paul Eggert writes: > I looked around, and it appears the GnuCash ran into a similar > problem. You might want to look at its solution, in: > > https://github.com/Gnucash/gnucash/blob/master/src/bin/gnucash-bin.c AFAIK GnuCash does not do much with subprocesses, so the fact that it doesn't place the locale in its environment (or use UTF-8) doesn't provide much useful guidance. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 11:23:32 2016 Received: (at control) by debbugs.gnu.org; 30 Jan 2016 16:23:32 +0000 Received: from localhost ([127.0.0.1]:42249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPYJA-0004nm-9K for submit@debbugs.gnu.org; Sat, 30 Jan 2016 11:23:32 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:33582) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPYJ8-0004nW-7Q for control@debbugs.gnu.org; Sat, 30 Jan 2016 11:23:30 -0500 Received: by mail-wm0-f41.google.com with SMTP id l66so18941230wml.0 for ; Sat, 30 Jan 2016 08:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:date:message-id:to:from:subject; bh=DwOQmUgJDRrTyGbrSNPfNlNyzuWHeBMypuTfhZ4MHEU=; b=TUCYCzmYOb05Pi+AlKpvJDKjP7+sqgnF4YpeXi4aZIDffrLs1uASymbTLjqGgFW0tX 6TmREwvONWFKGVtJCDB1IkYYeynKJx0kMqX1CVtFEWaHqc/OHwJqpaSjo1ym9J729bN/ E5LrA7nhY+xfpa/mUt0PT/4XIARuG/j11IvNsVbcbvrGsyRL0PqfzFe0T2QgDkPa0K3b miAI1UbB7qTq0ZPU7XWB3UXbTJSqAdw4XD3ziCx4rCvAOBleDthutgJT8WP/qhrqSmYS WKqZdVEMBcmhYUa9F2C9as/mRD9MD4yul2ZMR6jcw4BvLQWYVy2P913NdD6w2b0ZL63c wl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:message-id:to:from:subject; bh=DwOQmUgJDRrTyGbrSNPfNlNyzuWHeBMypuTfhZ4MHEU=; b=HowsU5pK8VVI1zPez8tTE5574gQ7J56Qknk+IUZWXOf7KB+KWD7oFcMRD+lYPuAuFs 8Gr3Gz7umWc/ZLh7kDKG+Sp3socrfNcTIugqEjEFWD9kmIy3aoYV3lKE3aUwt6H+LqSF H+Rv069Lcok+CfWI8iR/tTpz1mZBph7XR1J/laivXWSdypmwITwoNjBN42ZDLYp5kVN7 vhh33TYaw6B/uoUpUIwSvA+smopZDZ0Tak7/IU50ZHx95XbC+pr9PePFfJ/PMG1p5W0y 9EjC/5O6WwOuyUn+8GBhaynZo9aJp8j1RTJPF7/pFi/uj3rpzJf60MiLMpFKUtotaqiN bYcA== X-Gm-Message-State: AG10YORhi91KzpgOs13J8OxSdePbPtGBUmPKTlRUyILJVRb5RC7uonL25CyVbuGvWfJCfw== X-Received: by 10.28.217.74 with SMTP id q71mr3212549wmg.68.1454171004613; Sat, 30 Jan 2016 08:23:24 -0800 (PST) Received: from galloway.idiocy.org (4.3.6.0.e.6.e.9.d.a.b.c.f.e.1.2.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:21ef:cbad:9e6e:634]) by smtp.gmail.com with ESMTPSA id e14sm3109054wmi.21.2016.01.30.08.23.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jan 2016 08:23:23 -0800 (PST) Date: Sat, 30 Jan 2016 16:23:21 +0000 Message-Id: To: control@debbugs.gnu.org From: Alan Third Subject: control message for bug #22392 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tags 22392 patch From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2016 05:04: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 To: Alan Third Cc: 22392@debbugs.gnu.org, Eli Zaretskii , Paul Eggert , emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14543030188162 (code B ref 22392); Mon, 01 Feb 2016 05:04:02 +0000 Received: (at 22392) by debbugs.gnu.org; 1 Feb 2016 05:03:38 +0000 Received: from localhost ([127.0.0.1]:43807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ6eH-00027a-Rk for submit@debbugs.gnu.org; Mon, 01 Feb 2016 00:03:38 -0500 Received: from mail-vk0-f54.google.com ([209.85.213.54]:34296) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ6eG-00027M-4p for 22392@debbugs.gnu.org; Mon, 01 Feb 2016 00:03:36 -0500 Received: by mail-vk0-f54.google.com with SMTP id e185so70469026vkb.1 for <22392@debbugs.gnu.org>; Sun, 31 Jan 2016 21:03:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z9BTKnRjUK1cJouVtnBXQyEIqBYr8A3JynFIxnmfTwo=; b=D5HR/FmSM2v2IvI0h/qkqG78Qd9R4yeScJ05hYm6jjkrQbwuMlSqi7XTf1gNdqQlgZ 1SgoVi+ilQ8YqTAfOzRat4K4aG1fblH7p0Gik1VqtSSHn6D4Xqp+ha2u/irGy0pZzaDZ vMsuUrzHaLXVL6AxQrKSonJ22UaZcWTW1yclyRgqdH1WMjnY+bNzXtQahaQhGnKZkgZ3 S3lOmRS2rnBWylLJw6FXaI+1dzw1KcKEWut9HaYpsmj9dGOMkxJHewrP5Ake5Tkzc1kG +Ft5lfUZ6ZmJZ6xMIgLOIL8D3olfqy4xXtFHNUaJQBFAYyLYAQFhq92zovUsaKGFPS2M Zv+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z9BTKnRjUK1cJouVtnBXQyEIqBYr8A3JynFIxnmfTwo=; b=IF/DFhUh8jdy97D0Z5+paxk6gA85/fVR7widTdSpduAX/jJeayGHMJCmgffV6+pXNh jBOtQ4IVNj5A684xTPQkKOFikbKQ+L6VHP00oOUeyWthIQgFW+YEpUBqRT36Be3+6Cbn Xfzgpqt6wPm19WgSdGPCZPYK6fIQ8dpkNfSEZyfCNYBcbtiOmoItWrWVMkmYBI1WRnhZ D3OO8SxIHUQYb0T2QjC2AzW7bEtteaVwk0kQB6XHLxQV3aqswG0wAcYSF3qWj2CAEaxZ +Qc1qoLuSpp7Weyvu+mtv31VDgPciMHp2T7SHfyf7eGuirMxUqbBiKwJnToSYykL0zVu 5XSA== X-Gm-Message-State: AG10YOTb7lOdutTc1jO4cxL5/0bXKsbfde3zuuLQDbCE7j14sfsz27eS50FWx54uC4JriC/hDGUqnC/bsNNKtg== MIME-Version: 1.0 X-Received: by 10.31.8.83 with SMTP id 80mr14478871vki.105.1454303010588; Sun, 31 Jan 2016 21:03:30 -0800 (PST) Received: by 10.31.214.131 with HTTP; Sun, 31 Jan 2016 21:03:30 -0800 (PST) In-Reply-To: References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> Date: Mon, 1 Feb 2016 06:03:30 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a1145542e578f08052aae4ef1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1145542e578f08052aae4ef1 Content-Type: text/plain; charset=UTF-8 Hi! Today, I tested this patch on OS X and GNUstep. From what I can see, it applies cleanly and work as intended. As the LANG variable is set early in the initialisation process, it will be propagated to `process-environment' and thus set for all processes started by Emacs. I suggest that we apply this patch, so that it will be included in the next Emacs 25 pretest. -- Anders Lindgren On Thu, Jan 28, 2016 at 11:53 PM, Alan Third wrote: > Paul Eggert writes: > > > On 01/26/2016 03:05 PM, Alan Third wrote: > > > > I looked around, and it appears the GnuCash ran into a similar > > problem. You might want to look at its solution, in: > > > > https://github.com/Gnucash/gnucash/blob/master/src/bin/gnucash-bin.c > > > I've had a look at that code and was initially worried at how much more > they have than I'd written, but I'm pretty sure that most of their code > is doing things that are done by mule in emacs. > > One thing I don't understand is that they're building up the locale > value from the two parts (language and country code) when NSLocale > provides a function that does that for you. Makes me wonder if they know > something I don't. > > They've also wrapped that bit of code in a try/catch as someone was > apparently getting a crash due to not having the country code set. I > can't replicate this, the only way I've found through Google is by using > XCode to unset the user's locale, and we don't use XCode. > > I've put in a try/catch anyway, just in case. > > > From b96c97cb16a980243389c01c10c5ab232fe6827e Mon Sep 17 00:00:00 2001 > From: Alan Third > Date: Thu, 28 Jan 2016 21:42:04 +0000 > Subject: [PATCH] Set locale when run from OS X GUI > > * src/emacs.c (main): Call ns_init_locale. > * src/nsterm.m (ns_init_locale): Get locale from OS and set LANG. > * src/nsterm.h: Include ns_init_locale. > --- > src/emacs.c | 5 +++++ > src/nsterm.h | 2 ++ > src/nsterm.m | 21 +++++++++++++++++++++ > 3 files changed, 28 insertions(+) > > diff --git a/src/emacs.c b/src/emacs.c > index aaf058e..10e81d5 100644 > --- a/src/emacs.c > +++ b/src/emacs.c > @@ -1378,6 +1378,11 @@ Using an Emacs configured with > --with-x-toolkit=lucid does not have this problem > init_ntproc (dumping); /* must precede init_editfns. */ > #endif > > +#ifdef HAVE_NS > + /* Initialise the locale from user defaults. */ > + ns_init_locale(); > +#endif > + > /* Initialize and GC-protect Vinitial_environment and > Vprocess_environment before set_initial_environment fills them > in. */ > diff --git a/src/nsterm.h b/src/nsterm.h > index 6ca584e..fa5399c 100644 > --- a/src/nsterm.h > +++ b/src/nsterm.h > @@ -1141,6 +1141,8 @@ extern void ns_retain_object (void *obj); > extern void *ns_alloc_autorelease_pool (void); > extern void ns_release_autorelease_pool (void *); > extern const char *ns_get_defaults_value (const char *key); > +extern void ns_init_locale (void); > + > > /* in nsmenu */ > extern void update_frame_tool_bar (struct frame *f); > diff --git a/src/nsterm.m b/src/nsterm.m > index b270e0e..4b04fd5 100644 > --- a/src/nsterm.m > +++ b/src/nsterm.m > @@ -586,6 +586,27 @@ ns_load_path (void) > > > void > +ns_init_locale (void) > +/* OS X doesn't set any environment variables for the locale when run > + from the GUI. Get the locale from the OS and set LANG. */ > +{ > + NSLocale *locale = [NSLocale currentLocale]; > + > + NSTRACE ("ns_init_locale"); > + > + @try > + { > + /* Set LANG to locale, but not if LANG is already set. */ > + setenv("LANG", [[locale localeIdentifier] UTF8String], 0); > + } > + @catch (NSException *e) > + { > + NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); > + } > +} > + > + > +void > ns_release_object (void *obj) > /* > -------------------------------------------------------------------------- > Release an object (callable from C) > -- > 2.5.4 (Apple Git-61) > > > > -- > Alan Third > > --001a1145542e578f08052aae4ef1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Today, I tested this patch on OS X = and GNUstep. From what I can see, it applies cleanly and work as intended.<= /div>

As the LANG variable is set early in the initialis= ation process, it will be propagated to `process-environment' and thus = set for all processes started by Emacs.

I suggest = that we apply this patch, so that it will be included in the next Emacs 25 = pretest.

=C2=A0 =C2=A0 -- Anders Lindgren

On Thu, Jan 28= , 2016 at 11:53 PM, Alan Third <alan@idiocy.org> wrote:
Paul Eggert <eggert@cs.ucla.edu> writes:

> On 01/26/2016 03:05 PM, Alan Third wrote:
>
> I looked around, and it appears the GnuCash ra= n into a similar
> problem. You might want to look at its solution, in:
>
> https://github.com/Gnucash/= gnucash/blob/master/src/bin/gnucash-bin.c


I've had a look at that code and was initially worried at how mu= ch more
they have than I'd written, but I'm pretty sure that most of their = code
is doing things that are done by mule in emacs.

One thing I don't understand is that they're building up the locale=
value from the two parts (language and country code) when NSLocale
provides a function that does that for you. Makes me wonder if they know something I don't.

They've also wrapped that bit of code in a try/catch as someone was
apparently getting a crash due to not having the country code set. I
can't replicate this, the only way I've found through Google is by = using
XCode to unset the user's locale, and we don't use XCode.

I've put in a try/catch anyway, just in case.


From b96c97cb16a980243389c01c10c5ab232fe6827e Mon Sep 17 00:00:00 2001<= br> From: Alan Third <alan@idiocy.org= >
Date: Thu, 28 Jan 2016 21:42:04 +0000
Subject: [PATCH] Set locale when run from OS X GUI

* src/emacs.c (main): Call ns_init_locale.
* src/nsterm.m (ns_init_locale): Get locale from OS and set LANG.
* src/nsterm.h: Include ns_init_locale.
---
=C2=A0src/emacs.c=C2=A0 |=C2=A0 5 +++++
=C2=A0src/nsterm.h |=C2=A0 2 ++
=C2=A0src/nsterm.m | 21 +++++++++++++++++++++
=C2=A03 files changed, 28 insertions(+)

diff --git a/src/emacs.c b/src/emacs.c
index aaf058e..10e81d5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1378,6 +1378,11 @@ Using an Emacs configured with --with-x-toolkit=3Dlu= cid does not have this problem
=C2=A0 =C2=A0init_ntproc (dumping); /* must precede init_editfns.=C2=A0 */<= br> =C2=A0#endif

+#ifdef HAVE_NS
+=C2=A0 /* Initialise the locale from user defaults. */
+=C2=A0 ns_init_locale();
+#endif
+
=C2=A0 =C2=A0/* Initialize and GC-protect Vinitial_environment and
=C2=A0 =C2=A0 =C2=A0 Vprocess_environment before set_initial_environment fi= lls them
=C2=A0 =C2=A0 =C2=A0 in.=C2=A0 */
diff --git a/src/nsterm.h b/src/nsterm.h
index 6ca584e..fa5399c 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1141,6 +1141,8 @@ extern void=C2=A0 ns_retain_object (void *obj);
=C2=A0extern void *ns_alloc_autorelease_pool (void);
=C2=A0extern void ns_release_autorelease_pool (void *);
=C2=A0extern const char *ns_get_defaults_value (const char *key);
+extern void ns_init_locale (void);
+

=C2=A0/* in nsmenu */
=C2=A0extern void update_frame_tool_bar (struct frame *f);
diff --git a/src/nsterm.m b/src/nsterm.m
index b270e0e..4b04fd5 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -586,6 +586,27 @@ ns_load_path (void)


=C2=A0void
+ns_init_locale (void)
+/* OS X doesn't set any environment variables for the locale when run<= br> +=C2=A0 =C2=A0from the GUI. Get the locale from the OS and set LANG. */
+{
+=C2=A0 NSLocale *locale =3D [NSLocale currentLocale];
+
+=C2=A0 NSTRACE ("ns_init_locale");
+
+=C2=A0 @try
+=C2=A0 =C2=A0 {
+=C2=A0 =C2=A0 =C2=A0 /* Set LANG to locale, but not if LANG is already set= . */
+=C2=A0 =C2=A0 =C2=A0 setenv("LANG", [[locale localeIdentifier] U= TF8String], 0);
+=C2=A0 =C2=A0 }
+=C2=A0 @catch (NSException *e)
+=C2=A0 =C2=A0 {
+=C2=A0 =C2=A0 =C2=A0 NSLog (@"Locale detection failed: %@: %@", = [e name], [e reason]);
+=C2=A0 =C2=A0 }
+}
+
+
+void
=C2=A0ns_release_object (void *obj)
=C2=A0/* ------------------------------------------------------------------= --------
=C2=A0 =C2=A0 =C2=A0Release an object (callable from C)
--
2.5.4 (Apple Git-61)



--
Alan Third


--001a1145542e578f08052aae4ef1-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2016 17:49: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 To: Anders Lindgren Cc: 22392@debbugs.gnu.org, Paul Eggert , emacs-devel Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14543489243843 (code B ref 22392); Mon, 01 Feb 2016 17:49:02 +0000 Received: (at 22392) by debbugs.gnu.org; 1 Feb 2016 17:48:44 +0000 Received: from localhost ([127.0.0.1]:45420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQIai-0000zv-0x for submit@debbugs.gnu.org; Mon, 01 Feb 2016 12:48:44 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37941) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQIaf-0000zi-QX for 22392@debbugs.gnu.org; Mon, 01 Feb 2016 12:48:42 -0500 Received: by mail-wm0-f52.google.com with SMTP id p63so82948864wmp.1 for <22392@debbugs.gnu.org>; Mon, 01 Feb 2016 09:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=sjyWIzA+ppIGx5Q626yWybsCnAe/xam+D3NwyxsemRA=; b=iC73bL8F/pR9g7IgE3F86Gx5R3XePGm9PUlS8WbusEDzuYlEfgZB55N34/MtS0QTnG DCbnvnhPxjsTXZZ3EfNVCbCQKVBOhFAIQjrwKlppDCkhn1C52LPmjaGg1NBPy5Q76fZ7 yPpEwgsTthPFTBrnHyBRCFFv1oQbxWruqGsL7SXn0usXgYH0uXDIk5+d8P9mY33tNvq/ yU1jT/DZxL3tcLt/gsz5gVPlogMn5LyilJnXbMbjyBqXiDgEdBPZkobqZlTycpeTvR43 PuLwl1VwB3sVbg568qk1/P1x55v9LY7HZUpvtIXrln7YO7Qw08VnSNthdRF4/Xnevha+ /aGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=sjyWIzA+ppIGx5Q626yWybsCnAe/xam+D3NwyxsemRA=; b=VA1X3LVOoe7p6gtvItmStWn/hh8byCylAcawwKdduXQiTk9dXMqHMeEz1bRFwiOgdN ctT2gqfI3lsfyo978Ma0Y3jYEWKUzG5eFWfoiXs6NGGeLOkKTD6Z4sq0d/16WCXcgRAz 3y6Q56Sqkk4TW7B7K1ZAjlq9uMmC4t58+A/rHhxUagGAxYkXeFZR7RMDhkQAzCU4YwLN sm5PKFW6DySwaDAz83B7qFc3Zn1ULrozz210L/nOZqF1ns/Y5UnBMrx8CowGei50Jkx7 mgqBF9INEV5tpfILMJmJjrgub/l9jhvMwee0FDawE65bQ/+qDOVppuyjaNZelyR+EA6b yZ1g== X-Gm-Message-State: AG10YOS4Bz9HwC98sJbu8P1uabpjMCGWkbQfOQb5q8xwYw22GK2jQ8cB2JwyhB6Z2mWYXQ== X-Received: by 10.194.112.41 with SMTP id in9mr23884020wjb.139.1454348916014; Mon, 01 Feb 2016 09:48:36 -0800 (PST) Received: from galloway.idiocy.org (0.2.a.b.5.d.d.e.5.5.0.6.4.e.8.6.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:68e4:6055:edd5:ba20]) by smtp.gmail.com with ESMTPSA id qs1sm30109065wjc.2.2016.02.01.09.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2016 09:48:35 -0800 (PST) Date: Mon, 1 Feb 2016 17:48:32 +0000 From: Alan Third Message-ID: <20160201174832.GA21475@galloway.idiocy.org> References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 01, 2016 at 06:03:30AM +0100, Anders Lindgren wrote: > Hi! >=20 > Today, I tested this patch on OS X and GNUstep. From what I can see, it > applies cleanly and work as intended. I'm glad you were able to test it on GNUStep. I was reasonably sure it would work, but couldn't check it. > I suggest that we apply this patch, so that it will be included in the ne= xt > Emacs 25 pretest. I don't know if my copyright assignment has gone through yet. I've not heard anything back. I guess that might hold things up? --=20 Alan Third --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWr5pwAAoJECxHyZKmkINrw8sH/AizonuOKvzYsx4j1NbLkyM1 /6N3EqoR9kiSlTlct2SQqtQpg0bS76MPW24AGe9QC0wf4VQo+7bqk7919qfyNvvb NOb3v746U1eXx8v+kQVEvBf9m6IgqG8qrr15RCqzPNSBOV6rkcejHLY6PADwl5jp iD6Yh/U5fC0mEdX4GLhgUacu/k9HZOph8TeLektfZVIxJV7pk3XgrXYudEVhpaCO izNTe/tj/CdPC8OPblIZiHyfiSBlVCzz4C8PEK+w75CTY9A0Qp4EKQSdYjFEqzQ3 1eJgBX0TR/rxpjd4nkrYBgKsL2F4m3se/Jkz8EO00C6XKaeTjFlx8GxIPMVM1FM= =etwe -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs-- From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2016 18:59:01 +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 To: Anders Lindgren Cc: 22392@debbugs.gnu.org, alan@idiocy.org, eggert@cs.ucla.edu, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145435309412336 (code B ref 22392); Mon, 01 Feb 2016 18:59:01 +0000 Received: (at 22392) by debbugs.gnu.org; 1 Feb 2016 18:58:14 +0000 Received: from localhost ([127.0.0.1]:45463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQJfx-0003Cs-Oc for submit@debbugs.gnu.org; Mon, 01 Feb 2016 13:58:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58250) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQJfw-0003BU-1F for 22392@debbugs.gnu.org; Mon, 01 Feb 2016 13:58:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQJfq-0006t5-0U for 22392@debbugs.gnu.org; Mon, 01 Feb 2016 13:58:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQJfl-0006rw-Pc; Mon, 01 Feb 2016 13:58:01 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1329 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aQJfk-0003kp-QM; Mon, 01 Feb 2016 13:58:01 -0500 Date: Mon, 01 Feb 2016 20:57:37 +0200 Message-Id: <838u341cny.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Anders Lindgren on Mon, 1 Feb 2016 06:03:30 +0100) References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) > Date: Mon, 1 Feb 2016 06:03:30 +0100 > From: Anders Lindgren > Cc: Paul Eggert , Eli Zaretskii , 22392@debbugs.gnu.org, > emacs-devel > > Today, I tested this patch on OS X and GNUstep. From what I can see, it applies cleanly and work as > intended. > > As the LANG variable is set early in the initialisation process, it will be propagated to `process-environment' > and thus set for all processes started by Emacs. > > I suggest that we apply this patch, so that it will be included in the next Emacs 25 pretest. I won't argue with that any more, but I must say that I'm uneasy with this change. I'd be much happier if we could push LANG into Emacs's own environment without affecting process-environment. Paul argued that we already do something similar on MS-Windows, which is true, but native Windows programs don't look at LANG unless specifically made to do so in application code, so that setting is unlikely to affect many programs on Windows. By contrast, OS X is (AFAIK) a BSD-ish system, so I expect much more programs to change their behavior when LANG is set to something that suits Emacs, but is not necessarily "right" for the rest of the system. That's all I have to say; if you are still OK with doing that, please go ahead. Thanks. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale In-Reply-To: Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 07:13:01 +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 To: 22392@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145465635425684 (code B ref -1); Fri, 05 Feb 2016 07:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Feb 2016 07:12:34 +0000 Received: from localhost ([127.0.0.1]:60934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRaZF-0006gC-Vi for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:12:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59353) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRaZD-0006fz-Mk for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:12:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRaZ7-0002kD-NI for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:12:26 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRaZ7-0002k9-Jn for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:12:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRaZ6-00035p-Lh for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 02:12:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRaZ3-0002ju-At for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 02:12:24 -0500 Received: from plane.gmane.org ([80.91.229.3]:46761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRaZ3-0002i4-4K for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 02:12:21 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aRaZ0-00059P-VU for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 08:12:19 +0100 Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Feb 2016 08:12:18 +0100 Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Feb 2016 08:12:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Random832 Date: Fri, 05 Feb 2016 02:12:12 -0500 Lines: 14 Message-ID: References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> <838u341cny.fsf__25231.4954218038$1454353164$gmane$org@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:IR5t16I/EU1Dz6H1zZSGkBc5AMk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Eli Zaretskii writes: > By contrast, OS X is (AFAIK) a BSD-ish system, so I expect much more > programs to change their behavior when LANG is set to something that > suits Emacs, but is not necessarily "right" for the rest of the > system. Why wouldn't it be right for the rest of the system? Keep in mind that 99% of the time the only programs that are going to be executing "BSD-ish" programs are going to be terminal emulators, which also set LANG. The main thing _I'm_ not comfortable with is the fact that it _doesn't_ set a UTF-8 locale. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 07:33: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 To: Random832 Cc: 22392@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14546575801521 (code B ref 22392); Fri, 05 Feb 2016 07:33:02 +0000 Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 07:33:00 +0000 Received: from localhost ([127.0.0.1]:60987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRat1-0000OT-Vw for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:33:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42520) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRat0-0000OH-NO for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 02:32:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRasq-00080q-QD for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 02:32:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRasq-00080d-MD; Fri, 05 Feb 2016 02:32:48 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1207 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRasp-00034C-Pn; Fri, 05 Feb 2016 02:32:48 -0500 Date: Fri, 05 Feb 2016 09:32:45 +0200 Message-Id: <83r3grvcgy.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Random832 on Fri, 05 Feb 2016 02:12:12 -0500) References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> <838u341cny.fsf__25231.4954218038$1454353164$gmane$org@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > From: Random832 > Date: Fri, 05 Feb 2016 02:12:12 -0500 > > Eli Zaretskii writes: > > > By contrast, OS X is (AFAIK) a BSD-ish system, so I expect much more > > programs to change their behavior when LANG is set to something that > > suits Emacs, but is not necessarily "right" for the rest of the > > system. > > Why wouldn't it be right for the rest of the system? I don't know. Why don't those programs do that today? > Keep in mind that 99% of the time the only programs that are going > to be executing "BSD-ish" programs are going to be terminal > emulators, which also set LANG. If you are saying those programs all have bugs, then I find it hard to believe, and anyway, it isn't Emacs's job to fix bugs all over the system. However, if enough use cases will be reported which show that indeed many programs invoked by Emacs work better with that setting in the environment, I will change my mind. No such examples materialized yet, AFAIR. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 07:37:01 +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 To: Eli Zaretskii Cc: 22392@debbugs.gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14546577951861 (code B ref 22392); Fri, 05 Feb 2016 07:37:01 +0000 Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 07:36:35 +0000 Received: from localhost ([127.0.0.1]:60995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRawU-0000Tx-P7 for submit@debbugs.gnu.org; Fri, 05 Feb 2016 02:36:34 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54923) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRawT-0000Tp-3O for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 02:36:33 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 69A082087E for <22392@debbugs.gnu.org>; Fri, 5 Feb 2016 02:36:32 -0500 (EST) Received: from web2 ([10.202.2.212]) by compute2.internal (MEProxy); Fri, 05 Feb 2016 02:36:32 -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=GddGkeyXOrqZK/iRX8n7ynzQqZM=; b=2bwEF3 EXpTKZDJ2M0KY29/3EyOwD4dpmCrGt9m1T03w7aDEcKA3DVMOptf+bqs4e0zebor Cds50FOxGTFx+7wyvdjyY82G3XRil22YthGmj/LXMcIRtBa7uxU2fcsksYBkC2ZH fQWVE0O+SFROxkKFyGlHQTceRaLC8dy/m/KT8= 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=GddGkeyXOrqZK/i RX8n7ynzQqZM=; b=M5C3gGQoXYsVflfTmlRr9us6oQ1lDkJ//a+gJsVSPSoLfvS g3obfx8RcMezDItW8gtgtkwgOmWyGha2NF3wy1UHyzzf3k390BXq6joW2O44vzib +osw3cBsCzMAPKfQ6GsrKVu2d2Pn8kHl8n+ZVNGrMGy3eXz64mMLKksKqog0= Received: by web2.nyi.internal (Postfix, from userid 99) id 1AE63540C04; Fri, 5 Feb 2016 02:36:32 -0500 (EST) Message-Id: <1454657792.67174.512690498.78EA5AE6@webmail.messagingengine.com> X-Sasl-Enc: DE3/7H2Aa08eIBAYn0sUtegSp05gvMEADtq/6ec8vfql 1454657792 From: Random832 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-61414df5 In-Reply-To: <83r3grvcgy.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> Date: Fri, 05 Feb 2016 02:36:32 -0500 X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Fri, Feb 5, 2016, at 02:32, Eli Zaretskii wrote: > I don't know. Why don't those programs do that today? Why don't which programs do what? Terminal emulators *do* set LANG, as is being proposed here to have Emacs do likewise. Other programs do not, in general, execute subprocesses that care about LANG, so the fact that they don't set LANG doesn't matter any more than that Windows programs don't set it. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 09:23: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 To: Random832 Cc: 22392@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145466412917777 (code B ref 22392); Fri, 05 Feb 2016 09:23:02 +0000 Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 09:22:09 +0000 Received: from localhost ([127.0.0.1]:32817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRcae-0004ce-Sb for submit@debbugs.gnu.org; Fri, 05 Feb 2016 04:22:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35546) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRcae-0004cR-5u for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 04:22:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRcaV-0007Ez-Tv for 22392@debbugs.gnu.org; Fri, 05 Feb 2016 04:22:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRcaV-0007Ev-Qh; Fri, 05 Feb 2016 04:21:59 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1317 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRcaU-0007XK-Gl; Fri, 05 Feb 2016 04:21:59 -0500 Date: Fri, 05 Feb 2016 11:21:53 +0200 Message-Id: <83k2mjv7f2.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <1454657792.67174.512690498.78EA5AE6@webmail.messagingengine.com> (message from Random832 on Fri, 05 Feb 2016 02:36:32 -0500) 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > From: Random832 > Cc: 22392@debbugs.gnu.org > Date: Fri, 05 Feb 2016 02:36:32 -0500 > > On Fri, Feb 5, 2016, at 02:32, Eli Zaretskii wrote: > > I don't know. Why don't those programs do that today? > > Why don't which programs The ones you alluded to. > do what? Set LANG for themselves. > Terminal emulators *do* set LANG, as is being proposed here to have > Emacs do likewise. Other programs do not, in general, execute > subprocesses that care about LANG, so the fact that they don't set > LANG doesn't matter any more than that Windows programs don't set > it. 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. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale 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 To: Eli Zaretskii Cc: 22392@debbugs.gnu.org Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.145469329610093 (code B ref 22392); Fri, 05 Feb 2016 17:29:02 +0000 Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 17:28:16 +0000 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 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 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) 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= Received: by web1.nyi.internal (Postfix, from userid 99) id C77EDAF4A34; Fri, 5 Feb 2016 12:28:13 -0500 (EST) Message-Id: <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> X-Sasl-Enc: xr6tITNTSLhg/5noYmUZpdoPmfYFuq+azM4U3CyeSbGg 1454693293 From: Random832 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-61414df5 Date: Fri, 05 Feb 2016 12:28:13 -0500 In-Reply-To: <83k2mjv7f2.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> X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale 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 To: Random832 Cc: 22392@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14547016033702 (code B ref 22392); Fri, 05 Feb 2016 19:47:02 +0000 Received: (at 22392) by debbugs.gnu.org; 5 Feb 2016 19:46:43 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Fri, 05 Feb 2016 21:46:10 +0200 Message-Id: <83r3grszy5.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <1454693293.840659.513114466.45E68AA0@webmail.messagingengine.com> (message from Random832 on Fri, 05 Feb 2016 12:28:13 -0500) 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) > 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. From unknown Sat Aug 16 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22392: Emacs OS X GUI doesn't set locale Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Feb 2016 23:58:01 +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 To: Anders Lindgren Cc: 22392@debbugs.gnu.org, Paul Eggert Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14551486783638 (code B ref 22392); Wed, 10 Feb 2016 23:58:01 +0000 Received: (at 22392) by debbugs.gnu.org; 10 Feb 2016 23:57:58 +0000 Received: from localhost ([127.0.0.1]:35515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTedy-0000wb-J4 for submit@debbugs.gnu.org; Wed, 10 Feb 2016 18:57:58 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37994) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTedw-0000wO-Jf for 22392@debbugs.gnu.org; Wed, 10 Feb 2016 18:57:56 -0500 Received: by mail-wm0-f46.google.com with SMTP id p63so47918656wmp.1 for <22392@debbugs.gnu.org>; Wed, 10 Feb 2016 15:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ahAL6eGr/tx3cFFt/JTqjbcDviWOskGnOONzb5YJkuM=; b=wNgXfR65MZ2AAusiuIvuQBte2VdglYRtcfhCn48MmCrYIMIblwRqbMUqibVMHEi3Ba HirmkZ6n3xrMXMduOpA09THfLLS8YYg/G11w2DOdgvaIOtR0fgZ7GbCKL5780xgGQXG3 eGQt/9uf/1ayQAcjmgUzgmwvvDixNh4vsv47ehMrov+XsiANptORrzWrdiZ2yaVl3IpC hhQCM9Y5q8orjOXXFtSF4cO5VvMnTaZb8BzkNhTsbABqJL5WbQPcU+lMR0oL9W+X/OtS H6tM0fHAMKewI44NSJrXlkcU0/D4+V3WpdcaoeY9auo/Ug3pstQFaNO4d1/H95FCQMNl 9R8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=ahAL6eGr/tx3cFFt/JTqjbcDviWOskGnOONzb5YJkuM=; b=PmEISNAtw0SI93wsZMqW+hGye4S5IumizxNcnVh1iOmFCG/gRZs5PGsueUnXaKJIMj rZcmVxOWXmIfYbF+Fvdqrn3oJP/gwKHePtPEhNCsyRmT+54o+8Imp2sUxUuc9WM1vSQV v7pAYLxEtRD0r/ZheI0GrHdwvfv0032kDiQ6DOZw0szsv29Q5qccN+fnpEES6HXfazGX owieuxsY9vTiWsKBOVrGjcojoZow/tblyb1nC0/qBC7ZgG9OLF6YP70JKGv+M7+goT7a is08OHEc6SC5wB7zzeMmyaXiOASXJ0eDUnFsY83NeVyPgXW0khv6ZMXCun7LP0SHRIcI ah3A== X-Gm-Message-State: AG10YOTsHuU9yCgr4gZepxJebqkcTRT9O3VS7MPceS8Pf63iFcPljw2ThZS2fc6TcyJwiw== X-Received: by 10.28.225.8 with SMTP id y8mr15038686wmg.94.1455148670951; Wed, 10 Feb 2016 15:57:50 -0800 (PST) Received: from galloway.idiocy.org (c.f.9.0.5.3.0.e.5.e.a.d.2.7.5.5.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:5572:dae5:e035:9fc]) by smtp.gmail.com with ESMTPSA id x65sm5491520wmg.4.2016.02.10.15.57.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Feb 2016 15:57:49 -0800 (PST) Date: Wed, 10 Feb 2016 23:57:47 +0000 From: Alan Third Message-ID: <20160210235747.GA2223@galloway.idiocy.org> References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 01, 2016 at 06:03:30AM +0100, Anders Lindgren wrote: > Today, I tested this patch on OS X and GNUstep. From what I can see, it > applies cleanly and work as intended. >=20 > As the LANG variable is set early in the initialisation process, it will = be > propagated to `process-environment' and thus set for all processes started > by Emacs. >=20 > I suggest that we apply this patch, so that it will be included in the ne= xt > Emacs 25 pretest. I received confirmation of my copyright assignment today, so if someone wants to apply the patch, that would be great. Additionally, if it is applied the documentation should probably be updated too. There's a bit under General Variables that should read something like: On MS-Windows and OS X, if LANG is not already set in the environment when Emacs starts, Emacs sets it based on the system-wide default language. This can be set in the 'Regional Settings' Control Panel on some versions of MS-Windows and in the 'Language and Region' System Preference on OS X. Should I recreate the patch with that change in it? --=20 Alan Third --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWu857AAoJECxHyZKmkINrnAsIAI7/c606Z0cOD/XY+UDF93hs bmfHLiP5yCcu7Iu+5B0R1xNibYUdPlqzdVeLM3uM5ECQnWuwYjXioRGiczo0AdJ2 vGYGxT4zWc0aaWfxhmHuvRd9VExB/YRp+VjjArPvvpHnAGrQc83llybQIclTeQqk sN9vJn8TP1x+1vLmwDQioNU0VJt+0Lof5LS+CHBYM1L6iZCxgi8F2zNZwR8nLiw/ 6HwxRhY/qsAWkcsTaXSL6DCYwYP5/Z/vvJASu4Djux3JSC5HoVum2WdNYrdGaTFa kvnmc0q5AXHqKGK1utFm9avnM6tyzM9qt1IVIoyS4cRyh088sQ474ATqyRJf4BU= =hZEC -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- From unknown Sat Aug 16 16:56:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alan Third Subject: bug#22392: closed (Re: bug#22392: Emacs OS X GUI doesn't set locale) Message-ID: References: <56BBF3E8.7040904@cs.ucla.edu> X-Gnu-PR-Message: they-closed 22392 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 22392@debbugs.gnu.org Date: Thu, 11 Feb 2016 02:38:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1455158281-24555-1" This is a multi-part message in MIME format... ------------=_1455158281-24555-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22392@debbugs.gnu.org. --=20 22392: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22392 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1455158281-24555-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22392-done) by debbugs.gnu.org; 11 Feb 2016 02:37:38 +0000 Received: from localhost ([127.0.0.1]:35552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTh8U-0006NW-Cz for submit@debbugs.gnu.org; Wed, 10 Feb 2016 21:37:38 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58896) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTh8S-0006NG-CF for 22392-done@debbugs.gnu.org; Wed, 10 Feb 2016 21:37:37 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DAE5C1601A6; Wed, 10 Feb 2016 18:37:29 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PTpQbz_bjin4; Wed, 10 Feb 2016 18:37:29 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 26BF41601A8; Wed, 10 Feb 2016 18:37:29 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id t7oj0yCc0UDS; Wed, 10 Feb 2016 18:37:29 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0D26C1601A6; Wed, 10 Feb 2016 18:37:29 -0800 (PST) Subject: Re: bug#22392: Emacs OS X GUI doesn't set locale To: Alan Third , Anders Lindgren References: <83twm01ju1.fsf@gnu.org> <83lh7c1igo.fsf@gnu.org> <56A90735.7090508@cs.ucla.edu> <20160210235747.GA2223@galloway.idiocy.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <56BBF3E8.7040904@cs.ucla.edu> Date: Wed, 10 Feb 2016 18:37:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160210235747.GA2223@galloway.idiocy.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 22392-done Cc: 22392-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On 02/10/2016 03:57 PM, Alan Third wrote: > I received confirmation of my copyright assignment today, so if > someone wants to apply the patch, that would be great. Thanks, I installed it into the emacs-25 branch. > Additionally, if it is applied the documentation should probably be > updated too. Thanks, I installed a doc update along the lines that you suggested. ------------=_1455158281-24555-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Jan 2016 14:28:00 +0000 Received: from localhost ([127.0.0.1]:51541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKoJD-00067J-Io for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:28:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43849) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKoJA-000675-TY for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKoJ2-0000Ii-J4 for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoJ2-0000Id-Ev for submit@debbugs.gnu.org; Sun, 17 Jan 2016 09:27:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoIz-0004vS-AP for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKoIw-0000HL-0t for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:45 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:37388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKoIv-0000H0-I9 for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2016 09:27:41 -0500 Received: by mail-wm0-x22c.google.com with SMTP id n5so28802483wmn.0 for ; Sun, 17 Jan 2016 06:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=yiBqz81CXPGWzCAc7vCxawvI9jB3ZCMSU2bSgkdtxII=; b=Qu/rUsPtCLNYiR2uk9VSnhDivuPbmFP4ul8QcPkoMdPw80qIQFGWuoae3PxMQ2LfCp fMLhIe/IMvZyOEEzk5IAMG1K19jAQK65oIgBTYXRYashOp7CiFj+LYXIKqvWadkZLiTk YaMhAqRHWiTuEnd73C2Q+plpFiVsoiQb4Sec9pbIMS6+UfPp8CE0b0Zu4DpxgVPbaotU 0L+060s024kC2lznWMFvP27fsm8k4vndF5hfqkhByZ4yAu7K5lBO2mfoX0EX6dRLK7XM GeeW/fhU6OJOfWDsDmYCqUdlWzRvuzeUNJLUNPaIFphAwAJCwoRxhSwI1tP45LS62Imn 8UmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-type; bh=yiBqz81CXPGWzCAc7vCxawvI9jB3ZCMSU2bSgkdtxII=; b=fDaKzb3IiwhaLU3wO+O1rAmGPyCEnOwfa7ONIIADD1crQCLp18s0IqMb2hA0XPCaqK WVFVkB4p7qNXf27p0uevGA05c5RPMpjmjrHoC/YMMqO7lBs6r5nuYC/muul6d2k4W14/ cIonfsdg2M0TU8vTzSxMrgvky/UdICwhv2rJNWqUxnHBdBnmr5WU4AI9Tw6+FrxkF3fb EwshjQuIu9Mk2+oBE4s2M470QjCqeGUzp8CA496BxC1HT6LI5nd3ykPoPsBiUwcQMT0u mTeIyG4kEdi+VMfw3F4uoJOg1bA30rOKgE0C/TgVxbSZ1c+FeHIQwGEdtdjYIhkgYDIE to6A== X-Gm-Message-State: AG10YOTtb5AR/1l0ldhvmKLGfltEGh/hZdCdnieBlrKKlDzXFkp/se+KluwvivUNBYKUfQ== X-Received: by 10.28.176.133 with SMTP id z127mr8767490wme.22.1453040860324; Sun, 17 Jan 2016 06:27:40 -0800 (PST) Received: from galloway.local (0.9.e.d.9.e.c.9.d.6.d.2.1.4.c.4.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:4c41:2d6d:9ce9:de90]) by smtp.gmail.com with ESMTPSA id lh1sm19359265wjb.20.2016.01.17.06.27.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jan 2016 06:27:39 -0800 (PST) From: Alan Third To: bug-gnu-emacs@gnu.org Subject: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Date: Sun, 17 Jan 2016 14:27:37 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain When Emacs is run from the OS X GUI (the dock, spotlight, finder, etc.) in OS X it doesn't set the locale correctly. Here's the output of C-h C RET on my machine with no user configuration: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): nil Coding system for keyboard input: = -- no-conversion (alias: binary) Coding system for terminal output: nil Coding system for inter-client cut and paste: nil Defaults for subprocess I/O: decoding: U -- utf-8-unix (alias: mule-utf-8-unix) encoding: U -- utf-8-unix (alias: mule-utf-8-unix) Priority order for recognizing coding systems when reading files: 1. utf-8 (alias: mule-utf-8) 2. iso-2022-7bit 3. iso-latin-1 (alias: iso-8859-1 latin-1) 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 I've snipped off the rest, if you want it I can provide it. Emacs relies on LC_ALL, LC_CTYPE or LANG being set, and OS X's terminal application sets the LANG environment variable. OS X doesn't set any of these variables when the application is run from the GUI. Additionally, Emacs detects when it's being run from the OS X terminal (mule-cmds.el line 2722) and hard-codes some settings. The Windows version of Emacs has a similar problem and solves this by running an "init_environment" function from main in emacs.c that uses the Windows APIs to set the LANG variable. (as described at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3221#32) I've written a patch that copies this functionality but for NextStep. c-h C RET gives: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for keyboard input: 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for terminal output: 1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix) Coding system for inter-client cut and paste: nil Defaults for subprocess I/O: decoding: U -- utf-8-unix (alias: mule-utf-8-unix) encoding: U -- utf-8-unix (alias: mule-utf-8-unix) Priority order for recognizing coding systems when reading files: 1. iso-latin-1 (alias: iso-8859-1 latin-1) 2. utf-8 (alias: mule-utf-8) 3. iso-2022-7bit 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 Which looks better to me. It also gives me A4 paper instead of legal and ispell/hunspell is better behaved. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Set-locale-when-run-from-OS-X-GUI.patch Content-Description: NS environment patch >From 85d5d2f0213e052d1eccb6dc9e00f090b894ef90 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 17 Jan 2016 13:56:12 +0000 Subject: [PATCH] Set locale when run from OS X GUI * configure.ac: Add nsinit.o to NS_OBJC_OBJ and link the Foundation framework. * src/emacs.c (main): Include nsinit.h and run init_environment. * src/nsinit.c (init_environment): Get locale from OS and set LANG. * src/nsinit.h: header for including nsinit.c. --- configure.ac | 4 ++-- src/emacs.c | 8 ++++++++ src/nsinit.h | 20 ++++++++++++++++++++ src/nsinit.m | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/nsinit.h create mode 100644 src/nsinit.m diff --git a/configure.ac b/configure.ac index 6c9b621..7f61344 100644 --- a/configure.ac +++ b/configure.ac @@ -1892,7 +1892,7 @@ if test "${HAVE_NS}" = yes; then INSTALL_ARCH_INDEP_EXTRA= fi - NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile" + NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsinit.o $ns_fontfile" fi CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" @@ -5083,7 +5083,7 @@ case "$opsys" in ## only costs about 1.5K of wasted binary space. headerpad_extra=1000 if test "$HAVE_NS" = "yes"; then - libs_nsgui="-framework AppKit" + libs_nsgui="-framework AppKit -framework Foundation" if test "$NS_IMPL_COCOA" = "yes"; then libs_nsgui="$libs_nsgui -framework IOKit" fi diff --git a/src/emacs.c b/src/emacs.c index b1b2170..9473bcd 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -56,6 +56,10 @@ along with GNU Emacs. If not, see . */ #include #endif +#ifdef HAVE_NS +#include "nsinit.h" +#endif + #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ @@ -1371,6 +1375,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_ntproc (dumping); /* must precede init_editfns. */ #endif +#ifdef HAVE_NS + init_environment(); +#endif + /* Initialize and GC-protect Vinitial_environment and Vprocess_environment before set_initial_environment fills them in. */ diff --git a/src/nsinit.h b/src/nsinit.h new file mode 100644 index 0000000..41b79c8 --- /dev/null +++ b/src/nsinit.h @@ -0,0 +1,20 @@ +/* Definitions for initialising NeXT/Open/GNUstep environment + Copyright (C) 2016 Free Software Foundation, + Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +void init_environment (void); diff --git a/src/nsinit.m b/src/nsinit.m new file mode 100644 index 0000000..32281a6 --- /dev/null +++ b/src/nsinit.m @@ -0,0 +1,33 @@ +/* NeXT/Open/GNUstep / MacOSX initialisation functions. -*- coding: utf-8 -*- + +Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2016 Free Software +Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#include +#include + +/* Set up the environment in cases where Emacs has been run from the + GUI and therefore has missing environment variables. */ +void +init_environment (void) +{ + const char * locale = [[[NSLocale currentLocale] localeIdentifier] UTF8String]; + + /* Set LANG to locale, but not if LANG is already set. */ + setenv("LANG", locale, 0); +} -- 2.5.4 (Apple Git-61) --=-=-= Content-Type: text/plain In GNU Emacs 25.0.50.1 (x86_64-apple-darwin15.2.0, NS appkit-1404.34 Version 10.11.2 (Build 15C50)) of 2016-01-16 built on galloway.idiocy.org Repository revision: a0d5b7ae3bb014bb0b1c205d123c597df0e76411 Windowing system distributor 'Apple', version 10.3.1404 Configured features: JPEG IMAGEMAGICK ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS Important settings: locale-coding-system: utf-8 Major mode: Text Minor modes in effect: global-flycheck-mode: t flycheck-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: .emacs.d/elpa/seq-20151028.759/seq.el: Pattern t is deprecated. Use `_' instead [4 times] For information about GNU Emacs and the GNU system, type C-h C-a. Quit Making completion list... Quit Making completion list... Load-path shadows: /Users/alan/.emacs.d/elpa/magit-20160116.333/magit-popup hides /Users/alan/.emacs.d/elpa/magit-popup-20160107.437/magit-popup /Users/alan/.emacs.d/elpa/org-20160111/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox /Users/alan/.emacs.d/elpa/org-20160111/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo /Users/alan/.emacs.d/elpa/org-20160111/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish /Users/alan/.emacs.d/elpa/org-20160111/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org /Users/alan/.emacs.d/elpa/org-20160111/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt /Users/alan/.emacs.d/elpa/org-20160111/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md /Users/alan/.emacs.d/elpa/org-20160111/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man /Users/alan/.emacs.d/elpa/org-20160111/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex /Users/alan/.emacs.d/elpa/org-20160111/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar /Users/alan/.emacs.d/elpa/org-20160111/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html /Users/alan/.emacs.d/elpa/org-20160111/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer /Users/alan/.emacs.d/elpa/org-20160111/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii /Users/alan/.emacs.d/elpa/org-20160111/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org /Users/alan/.emacs.d/elpa/org-20160111/org-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-w3m /Users/alan/.emacs.d/elpa/org-20160111/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version /Users/alan/.emacs.d/elpa/org-20160111/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer /Users/alan/.emacs.d/elpa/org-20160111/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table /Users/alan/.emacs.d/elpa/org-20160111/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src /Users/alan/.emacs.d/elpa/org-20160111/org-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-rmail /Users/alan/.emacs.d/elpa/org-20160111/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol /Users/alan/.emacs.d/elpa/org-20160111/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot /Users/alan/.emacs.d/elpa/org-20160111/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete /Users/alan/.emacs.d/elpa/org-20160111/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse /Users/alan/.emacs.d/elpa/org-20160111/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile /Users/alan/.emacs.d/elpa/org-20160111/org-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mhe /Users/alan/.emacs.d/elpa/org-20160111/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs /Users/alan/.emacs.d/elpa/org-20160111/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro /Users/alan/.emacs.d/elpa/org-20160111/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs /Users/alan/.emacs.d/elpa/org-20160111/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list /Users/alan/.emacs.d/elpa/org-20160111/org-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-irc /Users/alan/.emacs.d/elpa/org-20160111/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install /Users/alan/.emacs.d/elpa/org-20160111/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask /Users/alan/.emacs.d/elpa/org-20160111/org-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-info /Users/alan/.emacs.d/elpa/org-20160111/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent /Users/alan/.emacs.d/elpa/org-20160111/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id /Users/alan/.emacs.d/elpa/org-20160111/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit /Users/alan/.emacs.d/elpa/org-20160111/org-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-gnus /Users/alan/.emacs.d/elpa/org-20160111/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote /Users/alan/.emacs.d/elpa/org-20160111/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed /Users/alan/.emacs.d/elpa/org-20160111/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces /Users/alan/.emacs.d/elpa/org-20160111/org-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-eshell /Users/alan/.emacs.d/elpa/org-20160111/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities /Users/alan/.emacs.d/elpa/org-20160111/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element /Users/alan/.emacs.d/elpa/org-20160111/org-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-docview /Users/alan/.emacs.d/elpa/org-20160111/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree /Users/alan/.emacs.d/elpa/org-20160111/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags /Users/alan/.emacs.d/elpa/org-20160111/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt /Users/alan/.emacs.d/elpa/org-20160111/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat /Users/alan/.emacs.d/elpa/org-20160111/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview /Users/alan/.emacs.d/elpa/org-20160111/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock /Users/alan/.emacs.d/elpa/org-20160111/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture /Users/alan/.emacs.d/elpa/org-20160111/org-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bibtex /Users/alan/.emacs.d/elpa/org-20160111/org-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bbdb /Users/alan/.emacs.d/elpa/org-20160111/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach /Users/alan/.emacs.d/elpa/org-20160111/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive /Users/alan/.emacs.d/elpa/org-20160111/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda /Users/alan/.emacs.d/elpa/org-20160111/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob /Users/alan/.emacs.d/elpa/org-20160111/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle /Users/alan/.emacs.d/elpa/org-20160111/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table /Users/alan/.emacs.d/elpa/org-20160111/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite /Users/alan/.emacs.d/elpa/org-20160111/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql /Users/alan/.emacs.d/elpa/org-20160111/ob-shen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shen /Users/alan/.emacs.d/elpa/org-20160111/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen /Users/alan/.emacs.d/elpa/org-20160111/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme /Users/alan/.emacs.d/elpa/org-20160111/ob-scala hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scala /Users/alan/.emacs.d/elpa/org-20160111/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass /Users/alan/.emacs.d/elpa/org-20160111/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby /Users/alan/.emacs.d/elpa/org-20160111/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref /Users/alan/.emacs.d/elpa/org-20160111/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R /Users/alan/.emacs.d/elpa/org-20160111/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python /Users/alan/.emacs.d/elpa/org-20160111/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml /Users/alan/.emacs.d/elpa/org-20160111/ob-picolisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-picolisp /Users/alan/.emacs.d/elpa/org-20160111/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl /Users/alan/.emacs.d/elpa/org-20160111/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org /Users/alan/.emacs.d/elpa/org-20160111/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave /Users/alan/.emacs.d/elpa/org-20160111/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml /Users/alan/.emacs.d/elpa/org-20160111/ob-mscgen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-mscgen /Users/alan/.emacs.d/elpa/org-20160111/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima /Users/alan/.emacs.d/elpa/org-20160111/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab /Users/alan/.emacs.d/elpa/org-20160111/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile /Users/alan/.emacs.d/elpa/org-20160111/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob /Users/alan/.emacs.d/elpa/org-20160111/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp /Users/alan/.emacs.d/elpa/org-20160111/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond /Users/alan/.emacs.d/elpa/org-20160111/ob-ledger hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ledger /Users/alan/.emacs.d/elpa/org-20160111/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex /Users/alan/.emacs.d/elpa/org-20160111/ob-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-keys /Users/alan/.emacs.d/elpa/org-20160111/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js /Users/alan/.emacs.d/elpa/org-20160111/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java /Users/alan/.emacs.d/elpa/org-20160111/ob-io hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-io /Users/alan/.emacs.d/elpa/org-20160111/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell /Users/alan/.emacs.d/elpa/org-20160111/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot /Users/alan/.emacs.d/elpa/org-20160111/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran /Users/alan/.emacs.d/elpa/org-20160111/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp /Users/alan/.emacs.d/elpa/org-20160111/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval /Users/alan/.emacs.d/elpa/org-20160111/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp /Users/alan/.emacs.d/elpa/org-20160111/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot /Users/alan/.emacs.d/elpa/org-20160111/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa /Users/alan/.emacs.d/elpa/org-20160111/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css /Users/alan/.emacs.d/elpa/org-20160111/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core /Users/alan/.emacs.d/elpa/org-20160111/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint /Users/alan/.emacs.d/elpa/org-20160111/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure /Users/alan/.emacs.d/elpa/org-20160111/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc /Users/alan/.emacs.d/elpa/org-20160111/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C /Users/alan/.emacs.d/elpa/org-20160111/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk /Users/alan/.emacs.d/elpa/org-20160111/ob-asymptote hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-asymptote /Users/alan/.emacs.d/elpa/seq-20151028.759/seq hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec epg gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils paredit flycheck find-func help-mode rx subr-x seq gv dash exec-path-from-shell finder-inf autoinsert csv-mode-autoloads gnuplot-autoloads go-mode-autoloads paredit-autoloads quack-autoloads queue-autoloads typopunct-autoloads info package epg-config wombat-theme cl-seq unichar easy-mmode powershell-mode derived compile comint ansi-color ring speedbar sb-image ezimage dframe easymenu edmacro kmacro cl-loaddefs pcase cl-lib windmove paren server time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 292894 11471) (symbols 48 27242 0) (miscs 40 65 228) (strings 32 44073 8751) (string-bytes 1 1326190) (vectors 16 43065) (vector-slots 8 757477 4748) (floats 8 188 150) (intervals 56 211 79) (buffers 976 14)) -- Alan Third --=-=-=-- ------------=_1455158281-24555-1--