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: Eli Zaretskii
Subject: Re: How to change the default date format?
Date: Thu, 18 Jul 2019 11:56:25 +0300

> From: Marcin Borkowski <address@hidden>
> 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?

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.



reply via email to

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