GNU bug report logs - #7233
24.0.50; language-environments interact badly with LANG settings

Previous Next

Package: emacs;

Reported by: Miles Bader <miles <at> gnu.org>

Date: Sun, 17 Oct 2010 22:49:02 UTC

Severity: normal

Found in version 24.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7233 in the body.
You can then email your comments to 7233 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7233; Package emacs. (Sun, 17 Oct 2010 22:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Miles Bader <miles <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 17 Oct 2010 22:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Miles Bader <miles <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; language-environments interact badly with LANG settings
Date: Mon, 18 Oct 2010 07:51:54 +0900
If you have an environment-specified language setting like LANG; for
instance if you start Emacs by doing:

   LANG=ja_JP.UTF-8  emacs

but you _also_ have a customized language environment, e.g., your .emacs
file does:

   (custom-set-variables
    '(current-language-environment "Japanese"))

... then the latter overrides the former, even when it probably
shouldn't.  In particular, it overrides the default coding, specifically
`default-file-name-coding-system', although the latter is exactly what
the coding portion of LANG seems intended to specify.

[In the case of the Japanese language environment, the customization
above changes `default-file-name-coding-system' to be
`japanese-iso-8bit', and also I wonder how useful that is as a default
-- at least around here, the coding systems that seem to be used for
encoding file names seem to either be UTF-8 (on modernish linu/macos) or
Shift-JIS (windows).]

BTW, I didn't notice this before because I have a line in my .emacs that
does (prefer-coding-system 'utf-8) after loading my customizations --
however, "M-x customize-themes" seems to _re-evaluate_ all of one's
customizations, which trashed my fix... maybe that's a separate bug??

Thanks,

-Miles



In GNU Emacs 24.0.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2010-10-18 on catnip
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired by date

Minor modes in effect:
  rcirc-track-minor-mode: t
  minibuffer-electric-default-mode: t
  tooltip-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-h v f i l e - n a m SPC c o SPC <return> C-x n <tab> 
<tab> <return> C-x C-v / t m p <return> C-x p C-x 1 
C-x g C-h v M-p d e f a SPC <return> C-x 1 C-v C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x 
C-v / t m p <return> g <escape> x c u s t o m i z e 
- t h e SPC <return> C-v C-n C-n C-n C-p C-a <return> 
C-x d g C-x s C-x k <return> <escape> x r e p o r t 
SPC e m <backspace> <backspace> <return>

Recent messages:
Checking new news...
Opening nntp server on news.individual.net...done
Reading active file via nnml...done
Opening nntp server on news.gmane.org...done
Reading active file via nndraft...done
Checking new news...done
Type C-x 1 to delete the help window.
Starting new Ispell process [default] ...
Parsing /home/miles/.mailrc... done
Scanning for dabbrevs...100%

Load-path shadows:
/usr/share/emacs23/site-lisp/magit hides /usr/share/emacs/site-lisp/magit
/usr/share/emacs23/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort dabbrev emacsbug mail-extr face-remap flyspell ispell
warnings my-mode-line-theme cus-edit gnus-topic parse-time byte-opt
bytecomp byte-compile nnml auth-source netrc gnus-delay gnus-draft
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime password-cache
dig mailcap gnus-sum gnus-group gnus-undo nndraft nnmh nnoo nnmail
mail-source format-spec gnus-start gnus-spec gnus-int gnus-range
gnus-win dired pp help-mode view lua-mode-autoloads package reporter
server uniquify rcirc time-date ring minibuf-eldef gnus gnus-ems
nnheader gnus-util wid-edit cus-start cus-load derived advice help-fns
advice-preload easy-mmode message sendmail regexp-opt rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader japan-util tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

-- 
`Life is a boundless sea of bitterness'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7233; Package emacs. (Tue, 08 Dec 2020 16:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 7233 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Miles Bader <miles <at> gnu.org>
Cc: 7233 <at> debbugs.gnu.org
Subject: Re: bug#7233: 24.0.50; language-environments interact badly with
 LANG settings
Date: Tue, 08 Dec 2020 17:38:06 +0100
Miles Bader <miles <at> gnu.org> writes:

> If you have an environment-specified language setting like LANG; for
> instance if you start Emacs by doing:
>
>    LANG=ja_JP.UTF-8  emacs
>
> but you _also_ have a customized language environment, e.g., your .emacs
> file does:
>
>    (custom-set-variables
>     '(current-language-environment "Japanese"))
>
> ... then the latter overrides the former, even when it probably
> shouldn't. 

(This bug report unfortunately got no response at the time.)

I think Emacs always (usually?) have in-Lisp settings override ones from
the environment?  I think anything else would be pretty surprising --
you should be able to call `current-language-environment' and have that
happen immediately, no matter what some environment variable said when
you started up Emacs?

So I think this works as designed, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 7233 <at> debbugs.gnu.org and Miles Bader <miles <at> gnu.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2020 16:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Jan 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.