unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to change the default date format?
Date: Fri, 19 Jul 2019 21:38:00 +0200	[thread overview]
Message-ID: <87ef2lke7b.fsf@mbork.pl> (raw)
In-Reply-To: <83o91ryb46.fsf@gnu.org>


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	other threads:[~2019-07-19 19:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16  4:32 How to change the default date format? Marcin Borkowski
2019-07-18  8:56 ` Eli Zaretskii
2019-07-19 19:38   ` Marcin Borkowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef2lke7b.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).