From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to change the default date format? Date: Thu, 18 Jul 2019 11:56:25 +0300 Message-ID: <83o91ryb46.fsf@gnu.org> References: <87y30y4n0p.fsf@mbork.pl> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="59932"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 18 10:56:41 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ho2DO-000FR1-Ke for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2019 10:56:38 +0200 Original-Received: from localhost ([::1]:35592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho2DM-0002pF-SU for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2019 04:56:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60288) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho2DJ-0002ox-IW for help-gnu-emacs@gnu.org; Thu, 18 Jul 2019 04:56:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ho2DJ-0007oQ-Eg for help-gnu-emacs@gnu.org; Thu, 18 Jul 2019 04:56:33 -0400 Original-Received: from [176.228.60.248] (port=2348 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ho2DI-0007wg-S1 for help-gnu-emacs@gnu.org; Thu, 18 Jul 2019 04:56:33 -0400 In-reply-to: <87y30y4n0p.fsf@mbork.pl> (message from Marcin Borkowski on Tue, 16 Jul 2019 06:32:54 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121196 Archived-At: > From: Marcin Borkowski > 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.