Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus in Emacs 25 changes language for format-time-string
@ 2016-09-29 11:35 Stefan Nobis
  2016-09-30  0:19 ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Nobis @ 2016-09-29 11:35 UTC (permalink / raw)
  To: ding

Hi.

Recently I switched from Emacs 24 to Emacs 25.1 with Gnus v5.13
(running on a german MacOS 10.11.6; compiled via Homebrew). I found a
strange change in behaviour that seems to be caused by Gnus.

Before the update the call (format-time-string "%a") gives me english
abbreviated day names - as I set my Emacs environment to english
(terminal LANG is en_US.UTF-8 and my Emacs init.el contains the call
(set-language-environment "English")).

After the update to Emacs 25, I still get the english day names
straight after starting Emacs (either with full config or with "emacs
-Q").

But as soon as I start Gnus (even with a massively stripped down
config), I suddenly get german day names (like "Do" for thursday
instead of the expected "Thu").

Has anyone an idea what causes this strange behaviour and how to
change it?

-- 
Until the next mail...,
Stefan.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gnus in Emacs 25 changes language for format-time-string
  2016-09-29 11:35 Gnus in Emacs 25 changes language for format-time-string Stefan Nobis
@ 2016-09-30  0:19 ` Katsumi Yamaoka
  2016-09-30  7:29   ` Stefan Nobis
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2016-09-30  0:19 UTC (permalink / raw)
  To: ding

On Thu, 29 Sep 2016 13:35:58 +0200, Stefan Nobis wrote:
> Recently I switched from Emacs 24 to Emacs 25.1 with Gnus v5.13
> (running on a german MacOS 10.11.6; compiled via Homebrew). I found a
> strange change in behaviour that seems to be caused by Gnus.

> Before the update the call (format-time-string "%a") gives me english
> abbreviated day names - as I set my Emacs environment to english
> (terminal LANG is en_US.UTF-8 and my Emacs init.el contains the call
> (set-language-environment "English")).

> After the update to Emacs 25, I still get the english day names
> straight after starting Emacs (either with full config or with "emacs
> -Q").

I can't think Gnus does do it.  But the value of the variable
`system-time-locale' gets changed to that of German, doesn't it?
If so, though I don't know what causes it, this would help:

(setq system-time-locale nil)

The value may be "C" or "en_US.UTF-8", etc. instead of nil.
If the `system-messages-locale' variable is changed also to what
is not your taste, you can set both of them by:

(set-locale-environment "C") ;; or "en_US.UTF-8", etc.

Regards,



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gnus in Emacs 25 changes language for format-time-string
  2016-09-30  0:19 ` Katsumi Yamaoka
@ 2016-09-30  7:29   ` Stefan Nobis
  2016-09-30  9:17     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Nobis @ 2016-09-30  7:29 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I can't think Gnus does do it.

I assume, something inside Gnus (e.g. formatting the summary buffer,
which contains dates) forces some kind of decision of some previously
rather undecided state. :)

> But the value of the variable `system-time-locale' gets changed to
> that of German, doesn't it?

No, `system-time-locale' as well as `system-messages-locale' are both
nil when Emacs starts as well as after having Gnus used for a while.

> (set-locale-environment "C") ;; or "en_US.UTF-8", etc.

But this hint really helped. I now use

(set-locale-environment "en_US.UTF-8")

in my init and this seems to fix my problem. Now I get english day
names everywhere. Thank you very much for your help!

-- 
Until the next mail...,
Stefan.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gnus in Emacs 25 changes language for format-time-string
  2016-09-30  7:29   ` Stefan Nobis
@ 2016-09-30  9:17     ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2016-09-30  9:17 UTC (permalink / raw)
  To: ding

On Fri, 30 Sep 2016 09:29:05 +0200, Stefan Nobis wrote:
> But this hint really helped. I now use

> (set-locale-environment "en_US.UTF-8")

> in my init and this seems to fix my problem. Now I get english day
> names everywhere. Thank you very much for your help!

You are welcome.  After your reply I learned that the nil value
for `system-time-locale' will be overridden by the value of
the LC_TIME environment variable.  For example:

$ export LC_TIME=ja_JP.UTF-8
$ emacs -batch -Q -eval '(message (format-time-string "%a"))'
 => 金

So, what you should do might be to set LC_TIME to C in the shell.
Here is the locale command output in my system:

$ locale
LANG=C
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

Regards,



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-30  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 11:35 Gnus in Emacs 25 changes language for format-time-string Stefan Nobis
2016-09-30  0:19 ` Katsumi Yamaoka
2016-09-30  7:29   ` Stefan Nobis
2016-09-30  9:17     ` Katsumi Yamaoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).