emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] buffer-locale setting of locale for day names in time-stam


From: William Henney
Subject: Re: [Orgmode] buffer-locale setting of locale for day names in time-stamps
Date: Fri, 7 Sep 2007 10:03:59 -0500

On 9/7/07, Carsten Dominik <address@hidden> wrote:
>
> On Sep 7, 2007, at 2:40, William Henney wrote:

> > On 9/6/07, Bastien <address@hidden> wrote:
> >> "William Henney" <address@hidden> writes:
> >>
> >>> Is there any way to have buffer-local (or file-local) setting of the
> >>> locale.
> >>
> >> What about the #+LANGUAGE option?
> >>
> >
> > Yes, I use this option. However, this value is not respected by the
> > time-stamps, which are implemented using format-time-string (a
> > built-in emacs function, written in C)
>
> I believe this has to do with the LANG and LC_TIME environment
> variables,
> but I don't know exactly what you have to set them to.
>

OK, I think I now have a working solution. I have tracked it down to
the variable system-time-locale. However, this is a global variable,
so you have to put

(make-variable-buffer-local 'system-time-locale)

in your .emacs. Then, you can put something like this at the bottom of
an org file:

* COMMENT local variables for this file
# Local Variables:
# system-time-locale: "es_MX.ISO8859-1"
# End:

which will set the locale for that file only. After editing the local
variables, you have to do M-x normal-mode to set them for your current
session.

Thanks to Bastien and Carsten for your suggestions.

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia




reply via email to

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