help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change the default date format?


From: Marcin Borkowski
Subject: Re: How to change the default date format?
Date: Fri, 19 Jul 2019 21:38:00 +0200
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2019-07-18, at 10:56, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Tue, 16 Jul 2019 06:32:54 +0200
>> 
>> I used to use my window manager's language settings, which (presumably)
>> included LC_ALL and/or other LC_* environment variables, and so I had
>> the "correct" date format in Emacs when I said
>> `(format-time-string "%x %X" ...)'.
>> 
>> Now that I've changed my wm to a more bare-bones one, how do I change
>> the locale/langage settings _from within Emacs_, in my init.el?
>> 
>> By reading through the manual, the docstring of `set-locale-environment'
>> and some trial and error, I found out about
>> `(set-locale-environment "pl_PL.utf-8")',
>> after trying "pl" and "pl_PL" as arguments to no avail.  Is this the
>> preferred method?
>
> The preferred method is to have the locale set up outside Emacs.  It
> is unclear to me why a change in the WM would somehow affect this, but
> in any case, you can set the locale in your shell's init/login files,
> right?

Well, my previous WM was in fact part of a desktop environment which
took care of a lot of thing (including locale settings).

> Doing this from inside Emacs should work, but is not recommended,
> because it will create a discrepancy between what Emacs assumes and
> what the external programs assume.

Thanks, that makes sense.

Best,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]