emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Suddenly, my timestamps get localized!
@ 2011-10-25  9:36 Tassilo Horn
  2011-10-25  9:41 ` Sebastien Vauban
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2011-10-25  9:36 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

when I insert a new timestame, I now get

  <2011-10-25 Di>

while it used to be <2011-10-25 Tue> until very recently.  (Di is
Dienstag which is German for Tuesday).  I've briefly grepped the org
source code, but I cannot see any localization there.

What's going on?  I even have no glue how org/emacs (correctly) guesses
that I'm German.  My locale is en_US.UTF-8...

Bye,
Tassilo

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25  9:36 Suddenly, my timestamps get localized! Tassilo Horn
@ 2011-10-25  9:41 ` Sebastien Vauban
  2011-10-25 10:13   ` Olaf Meeuwissen
  2011-10-25 10:25   ` Tassilo Horn
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastien Vauban @ 2011-10-25  9:41 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> when I insert a new timestame, I now get
>
>   <2011-10-25 Di>
>
> while it used to be <2011-10-25 Tue> until very recently.  (Di is
> Dienstag which is German for Tuesday).  I've briefly grepped the org
> source code, but I cannot see any localization there.
>
> What's going on?  I even have no glue how org/emacs (correctly) guesses
> that I'm German.  My locale is en_US.UTF-8...

Found in my .emacs:

#+begin_src emacs-lisp
      ;; system locale to use for formatting time values (e.g., timestamps in
      ;; Org mode files)
      (setq system-time-locale "C")
      ;; "en_US.utf8" did not work for the weekday in the agenda!
#+end_src

Now, the question is: why did it change on your machine? New Emacs, new Cygwin
(if on Windows)? See discussion
http://cygwin.com/ml/cygwin/2011-09/msg00006.html on Cygwin (though I don't
know what to understand from it...).

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25  9:41 ` Sebastien Vauban
@ 2011-10-25 10:13   ` Olaf Meeuwissen
  2011-10-25 10:25   ` Tassilo Horn
  1 sibling, 0 replies; 9+ messages in thread
From: Olaf Meeuwissen @ 2011-10-25 10:13 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Tassilo,
>
> Tassilo Horn wrote:
>> when I insert a new timestame, I now get
>>
>>   <2011-10-25 Di>
>>
>> while it used to be <2011-10-25 Tue> until very recently.  (Di is
>> Dienstag which is German for Tuesday).  I've briefly grepped the org
>> source code, but I cannot see any localization there.
>>
>> What's going on?  I even have no glue how org/emacs (correctly) guesses
>> that I'm German.  My locale is en_US.UTF-8...
>
> Found in my .emacs:
>
> #+begin_src emacs-lisp
>       ;; system locale to use for formatting time values (e.g., timestamps in
>       ;; Org mode files)
>       (setq system-time-locale "C")
>       ;; "en_US.utf8" did not work for the weekday in the agenda!
> #+end_src
>
> Now, the question is: why did it change on your machine? New Emacs, new Cygwin
> (if on Windows)? See discussion
> http://cygwin.com/ml/cygwin/2011-09/msg00006.html on Cygwin (though I don't
> know what to understand from it...).

Or updated localisation catalogs.

I've also put (setq system-time-locale "C") in my .emacs-en because that
is the only sane settings if you move your org-files between accounts in
any kind of way.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25  9:41 ` Sebastien Vauban
  2011-10-25 10:13   ` Olaf Meeuwissen
@ 2011-10-25 10:25   ` Tassilo Horn
  2011-10-25 10:37     ` Sebastien Vauban
  1 sibling, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2011-10-25 10:25 UTC (permalink / raw)
  To: emacs-orgmode

"Sebastien Vauban"
<wxhgmqzgwmuf@spammotel.com> writes:

Hi Sebastien,

>> What's going on?  I even have no glue how org/emacs (correctly)
>> guesses that I'm German.  My locale is en_US.UTF-8...
>
> Found in my .emacs:
>
> #+begin_src emacs-lisp
>       ;; system locale to use for formatting time values (e.g., timestamps in
>       ;; Org mode files)
>       (setq system-time-locale "C")
>       ;; "en_US.utf8" did not work for the weekday in the agenda!
> #+end_src

Ok, that does the trick.  It was nil before.  And

  (setq system-time-locale (getenv "LANG"))

resulting in "en_US.utf8" seems to work as well.  What did not work for
you in the agenda?

> Now, the question is: why did it change on your machine? New Emacs,
> new Cygwin (if on Windows)?

I'm on GNU/Linux and update my emacs bzr and org git checkouts about
thrice a week.  All I can say is that a week ago, timestamps where
English (or at least I didn't notice).

Bye,
Tassilo

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25 10:25   ` Tassilo Horn
@ 2011-10-25 10:37     ` Sebastien Vauban
  2011-10-25 10:39       ` Tassilo Horn
  2011-10-27  7:46       ` Sebastien Vauban
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastien Vauban @ 2011-10-25 10:37 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>>> What's going on?  I even have no glue how org/emacs (correctly)
>>> guesses that I'm German.  My locale is en_US.UTF-8...
>>
>> Found in my .emacs:
>>
>> #+begin_src emacs-lisp
>>       ;; system locale to use for formatting time values (e.g., timestamps in
>>       ;; Org mode files)
>>       (setq system-time-locale "C")
>>       ;; "en_US.utf8" did not work for the weekday in the agenda!
>> #+end_src
>
> Ok, that does the trick.  It was nil before.

Good to know!

> And
>
>   (setq system-time-locale (getenv "LANG"))
>
> resulting in "en_US.utf8" seems to work as well.  What did not work for
> you in the agenda?

When I wrote (months ago) "did not work", I meant: I got French weekdays in my
agenda ("Lun." for Monday, "Mar.", "Mer.", etc. -- even on 4 characters).

I could retry... but I don't have UTF8 specified in my LANG var. I should do
add it, I guess.

Best regards,
  Seb

PS- I'm on Windows XP, with a win32 binary from FSF.

-- 
Sebastien Vauban

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25 10:37     ` Sebastien Vauban
@ 2011-10-25 10:39       ` Tassilo Horn
  2011-10-27  7:46       ` Sebastien Vauban
  1 sibling, 0 replies; 9+ messages in thread
From: Tassilo Horn @ 2011-10-25 10:39 UTC (permalink / raw)
  To: emacs-orgmode

"Sebastien Vauban"
<wxhgmqzgwmuf@spammotel.com> writes:

>> And
>>
>>   (setq system-time-locale (getenv "LANG"))
>>
>> resulting in "en_US.utf8" seems to work as well.  What did not work
>> for you in the agenda?
>
> When I wrote (months ago) "did not work", I meant: I got French
> weekdays in my agenda ("Lun." for Monday, "Mar.", "Mer.", etc. -- even
> on 4 characters).

With system-time-locale nil, I got Mo, Di, Mi,... only in the timestamps
while the agenda was still Monday, Tuesday, Wednesday...

Bye,
Tassilo

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

* Re: Suddenly, my timestamps get localized!
  2011-10-25 10:37     ` Sebastien Vauban
  2011-10-25 10:39       ` Tassilo Horn
@ 2011-10-27  7:46       ` Sebastien Vauban
  2011-10-27  8:40         ` Tassilo Horn
  1 sibling, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2011-10-27  7:46 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

> Tassilo Horn wrote:
>> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>>
>>>> What's going on?  I even have no glue how org/emacs (correctly)
>>>> guesses that I'm German.  My locale is en_US.UTF-8...
>>>
>>> Found in my .emacs:
>>>
>>> #+begin_src emacs-lisp
>>>       ;; system locale to use for formatting time values (e.g., timestamps in
>>>       ;; Org mode files)
>>>       (setq system-time-locale "C")
>>>       ;; "en_US.utf8" did not work for the weekday in the agenda!
>>> #+end_src
>>
>> Ok, that does the trick.  It was nil before.
>> And
>>
>>   (setq system-time-locale (getenv "LANG"))
>>
>> resulting in "en_US.utf8" seems to work as well.  What did not work for
>> you in the agenda?
>
> When I wrote (months ago) "did not work", I meant: I got French weekdays in my
> agenda ("Lun." for Monday, "Mar.", "Mer.", etc. -- even on 4 characters).
>
> I could retry... but I don't have UTF8 specified in my LANG var. I should do
> add it, I guess.

Just to confirm:

   (setq system-time-locale (getenv "en_US.utf8"))

in my .emacs is not working for me: I get French timestamps (I mean: weekday
abbreviations) in Org (on `C-c .', for example).

Setting it back, on-the-fly (with `C-x C-e') to "C" works: I get English
timestamps.

Though, setting it back once again to "en_US.utf8" works as well: I now still
get English timestamps!?

That seems to indicate that setting that var before Org or after Org doesn't
provide me with the same view. I say Org, but maybe it's before or after
another one. Should be investigated, but not that clear anymore...

> PS- I'm on Windows XP, with a win32 binary from FSF.

(and Cygwin for the subshell, but Emacs is not launched from it).

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Suddenly, my timestamps get localized!
  2011-10-27  7:46       ` Sebastien Vauban
@ 2011-10-27  8:40         ` Tassilo Horn
  2011-10-27  9:34           ` Sebastien Vauban
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2011-10-27  8:40 UTC (permalink / raw)
  To: emacs-orgmode

"Sebastien Vauban"
<wxhgmqzgwmuf@spammotel.com> writes:

Hi Sebastien,

> Just to confirm:
>
>    (setq system-time-locale (getenv "en_US.utf8"))
>
> in my .emacs is not working for me: I get French timestamps (I mean:
> weekday abbreviations) in Org (on `C-c .', for example).

Well, that line above tries to get the value of the environment variable
en_US.utf8.  There is no such variable, so `getenv' returns nil leaving
you with the default setting of `system-time-locale'.

> Setting it back, on-the-fly (with `C-x C-e') to "C" works: I get
> English timestamps.
>
> Though, setting it back once again to "en_US.utf8" works as well: I
> now still get English timestamps!?

See. ;-)

Bye,
Tassilo

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

* Re: Suddenly, my timestamps get localized!
  2011-10-27  8:40         ` Tassilo Horn
@ 2011-10-27  9:34           ` Sebastien Vauban
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Vauban @ 2011-10-27  9:34 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> Just to confirm:
>>
>>    (setq system-time-locale (getenv "en_US.utf8"))
>>
>> in my .emacs is not working for me: I get French timestamps (I mean:
>> weekday abbreviations) in Org (on `C-c .', for example).
>
> Well, that line above tries to get the value of the environment variable
> en_US.utf8.  There is no such variable, so `getenv' returns nil leaving
> you with the default setting of `system-time-locale'.

No. Sorry, I just edited directly in the mail, when answering... but was
apparently too fast (or I just didn't read it carefully before sending it).

If can assure you I had (the effect of):

    (setq system-time-locale "en_US.utf8")

in my .emacs.

The real lines in my .emacs were:

#+begin_src emacs-lisp
      ;; specify your character-set locale
      (setenv "LANG" "en_US.utf8")

      ;; system locale to use for formatting time values (e.g., timestamps in
      ;; Org mode files)
      (setq system-time-locale (getenv "LANG"))
#+end_src

Why setting LANG? Because that environment variable doesn't exist on Windows,
and was needed to quiet SVN (stop reporting warnings).

>> Setting it back, on-the-fly (with `C-x C-e') to "C" works: I get
>> English timestamps.
>>
>> Though, setting it back once again to "en_US.utf8" works as well: I
>> now still get English timestamps!?
>
> See. ;-)

Case still open (for understanding it fully, on my side: why setting it early
in my .emacs file is different than setting it afterward).

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2011-10-27  9:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  9:36 Suddenly, my timestamps get localized! Tassilo Horn
2011-10-25  9:41 ` Sebastien Vauban
2011-10-25 10:13   ` Olaf Meeuwissen
2011-10-25 10:25   ` Tassilo Horn
2011-10-25 10:37     ` Sebastien Vauban
2011-10-25 10:39       ` Tassilo Horn
2011-10-27  7:46       ` Sebastien Vauban
2011-10-27  8:40         ` Tassilo Horn
2011-10-27  9:34           ` Sebastien Vauban

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).