emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-time-stamp in German or Spanish or....
@ 2020-09-06  9:15 Uwe Brauer
  2020-09-06 10:50 ` Heinz Tuechler
  2020-09-06 12:53 ` org-time-stamp in German or Spanish or Stefan Nobis
  0 siblings, 2 replies; 11+ messages in thread
From: Uwe Brauer @ 2020-09-06  9:15 UTC (permalink / raw)
  To: emacs-orgmode



Hi 

Org-time-stamp inserts a date as specified in 
(org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y %a %H:%M "))

But is inserts the name of the days in English, which variable allows me
to change the language?

I thought maybe 

(defun my-set-calendar-deutsch ()		;Version:1.190
 (interactive)
     (setq calendar-week-start-day 1
           calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
                                    "Donnerstag" "Freitag" "Samstag"]))


But it does not: it steill does <2020-09-06 Sun>

What do I miss?

Thanks

Uwe Brauer 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06  9:15 org-time-stamp in German or Spanish or Uwe Brauer
@ 2020-09-06 10:50 ` Heinz Tuechler
  2020-09-06 12:01   ` Uwe Brauer
  2020-09-06 12:53 ` org-time-stamp in German or Spanish or Stefan Nobis
  1 sibling, 1 reply; 11+ messages in thread
From: Heinz Tuechler @ 2020-09-06 10:50 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 11:15:
>
>
> Hi
>
> Org-time-stamp inserts a date as specified in
> (org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y %a %H:%M "))
>
> But is inserts the name of the days in English, which variable allows me
> to change the language?
>
> I thought maybe
>
> (defun my-set-calendar-deutsch ()		;Version:1.190
>  (interactive)
>      (setq calendar-week-start-day 1
>            calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
>                                     "Donnerstag" "Freitag" "Samstag"]))
>
>
> But it does not: it steill does <2020-09-06 Sun>
>
> What do I miss?
>
> Thanks
>
> Uwe Brauer
>

For me

(setq calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
			       "Donnerstag" "Freitag" "Samstag"]
       calendar-month-name-array ["Januar" "Februar" "Maerz" "April"
"Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember"])

in .emacs works

regards,
Heinz



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06 10:50 ` Heinz Tuechler
@ 2020-09-06 12:01   ` Uwe Brauer
  2020-09-06 12:31     ` Heinz Tuechler
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2020-09-06 12:01 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 713 bytes --]


   > Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 11:15:

   > For me

   > (setq calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
   > 			       "Donnerstag" "Freitag" "Samstag"]
   >       calendar-month-name-array ["Januar" "Februar" "Maerz" "April"
   > "Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember"])

   > in .emacs works

Thanks not for me, I just use your setting but org-time-stamp 
*still* inserts <2020-09-06 Sun> in the mail buffer where the stamp
overlays are off. But shouldn't it be <2020-09-06 Son> or something like this

If you fire up org-time-stamp in a mail buffer what does it insert with
your setting? 

Thanks 

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06 12:01   ` Uwe Brauer
@ 2020-09-06 12:31     ` Heinz Tuechler
  2020-09-06 15:49       ` [Some progress] (was: org-time-stamp in German or Spanish or....) Uwe Brauer
  0 siblings, 1 reply; 11+ messages in thread
From: Heinz Tuechler @ 2020-09-06 12:31 UTC (permalink / raw)
  To: emacs-orgmode



Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 14:01:
>
>    > Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 11:15:
>
>    > For me
>
>    > (setq calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
>    > 			       "Donnerstag" "Freitag" "Samstag"]
>    >       calendar-month-name-array ["Januar" "Februar" "Maerz" "April"
>    > "Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember"])
>
>    > in .emacs works
>
> Thanks not for me, I just use your setting but org-time-stamp
> *still* inserts <2020-09-06 Sun> in the mail buffer where the stamp
> overlays are off. But shouldn't it be <2020-09-06 Son> or something like this
>
> If you fire up org-time-stamp in a mail buffer what does it insert with
> your setting?
>
> Thanks
>
> Uwe
>
Can't answer this, because I don't use a mail buffer, but in an org-file
I use C-c . to insert an active time stamp (result: <2020-09-06 So>) or
C-c ! for an inactive one (result: [2020-09-06 So])

regards,
Heinz


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06  9:15 org-time-stamp in German or Spanish or Uwe Brauer
  2020-09-06 10:50 ` Heinz Tuechler
@ 2020-09-06 12:53 ` Stefan Nobis
  2020-09-06 15:58   ` Uwe Brauer
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Nobis @ 2020-09-06 12:53 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> But is inserts the name of the days in English

The format and language of the time-stamps is controlled by the
function format-time-string (the docstring of this function shows all
the available placeholders, including "%a" for the locale's
abbreviated name of the day of week).

So the name of the days should be controlled by the locale Emacs is
running in (or the relevant language settings inside Emacs).

For example I want to enforce English names, so I have in my init.el:

#+begin_src elisp
(set-language-environment "English")
(set-locale-environment "en_US.UTF-8")
#+end_src

You can check what locale Emacs is using by inspecting the variables
`current-language-environment', and especially `system-time-locale'
(for the case that LC_TIME is set differently than other locale
settings).

-- 
Until the next mail...,
Stefan.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Some progress] (was: org-time-stamp in German or Spanish or....)
  2020-09-06 12:31     ` Heinz Tuechler
@ 2020-09-06 15:49       ` Uwe Brauer
  2020-09-06 22:19         ` [Some progress] Heinz Tuechler
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2020-09-06 15:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]


> Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 14:01:
> Can't answer this, because I don't use a mail buffer, but in an org-file
> I use C-c . to insert an active time stamp (result: <2020-09-06 So>) or
> C-c ! for an inactive one (result: [2020-09-06 So])



ah you use a mail (nor message) buffer when answering this message

In any case 


I found out that 
(set-locale-environment "es_ES.UTF-8") inserts <2020-09-06 dom> 

But 
(set-locale-environment "de_DE.UTF-8") inserts <2020-09-06 Sun> 


Which is odd. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06 12:53 ` org-time-stamp in German or Spanish or Stefan Nobis
@ 2020-09-06 15:58   ` Uwe Brauer
  2020-09-06 16:17     ` Stefan Nobis
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2020-09-06 15:58 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]

>>> "SN" == Stefan Nobis <stefan-ml@snobis.de> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> But is inserts the name of the days in English

> The format and language of the time-stamps is controlled by the
> function format-time-string (the docstring of this function shows all
> the available placeholders, including "%a" for the locale's
> abbreviated name of the day of week).

> So the name of the days should be controlled by the locale Emacs is
> running in (or the relevant language settings inside Emacs).

> For example I want to enforce English names, so I have in my init.el:

> #+begin_src elisp
> (set-language-environment "English")
> (set-locale-environment "en_US.UTF-8")
> #+end_src

Thanks, so far so good, *but*

(set-language-environment "German")
(set-locale-environment "de_DE.UTF-8")

Does *not* insert a german date it inserts 
an English one:


<2020-09-06 Sun>


> You can check what locale Emacs is using by inspecting the variables
> `current-language-environment', and especially `system-time-locale'
> (for the case that LC_TIME is set differently than other locale
> settings).
current-language-environment is a variable defined in ‘mule-cmds.el’.
Its value is "German"
Original value was "English"

system-time-locale is a variable defined in ‘C source code’.
Its value is "de_DE.UTF-8"


But it still inserts <2020-09-06 Sun>

Is this a bug?

Regards

Uwe Brauer 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-time-stamp in German or Spanish or....
  2020-09-06 15:58   ` Uwe Brauer
@ 2020-09-06 16:17     ` Stefan Nobis
  2020-09-06 17:43       ` [solved it] (was: org-time-stamp in German or Spanish or....) Uwe Brauer
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Nobis @ 2020-09-06 16:17 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> But it still inserts <2020-09-06 Sun>

What's the value of `system-time-locale'?

In a shell (like Bash), is there a difference between the following
two commands:

#+begin_src bash
LC_TIME=C date
#+end_src

#+begin_src bash
LC_TIME=de_DE date
#+end_src

-- 
Until the next mail...,
Stefan.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [solved it] (was: org-time-stamp in German or Spanish or....)
  2020-09-06 16:17     ` Stefan Nobis
@ 2020-09-06 17:43       ` Uwe Brauer
  0 siblings, 0 replies; 11+ messages in thread
From: Uwe Brauer @ 2020-09-06 17:43 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

>>> "SN" == Stefan Nobis <stefan-ml@snobis.de> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:
   >> But it still inserts <2020-09-06 Sun>

   > What's the value of `system-time-locale'?

I found that I had to re-run 



 sudo locale-gen de_DE.UTF-8

 sudo dpkg-reconfigure locales

Then it worked as expected. Thanks! <2020-09-06 So>


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5671 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Some progress]
  2020-09-06 15:49       ` [Some progress] (was: org-time-stamp in German or Spanish or....) Uwe Brauer
@ 2020-09-06 22:19         ` Heinz Tuechler
  2020-09-07  6:49           ` Uwe Brauer
  0 siblings, 1 reply; 11+ messages in thread
From: Heinz Tuechler @ 2020-09-06 22:19 UTC (permalink / raw)
  To: emacs-orgmode



Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 17:49:
>
>> Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 14:01:
>> Can't answer this, because I don't use a mail buffer, but in an org-file
>> I use C-c . to insert an active time stamp (result: <2020-09-06 So>) or
>> C-c ! for an inactive one (result: [2020-09-06 So])
>
>
>
> ah you use a mail (nor message) buffer when answering this message
>
> In any case
>
>
> I found out that
> (set-locale-environment "es_ES.UTF-8") inserts <2020-09-06 dom>
>
> But
> (set-locale-environment "de_DE.UTF-8") inserts <2020-09-06 Sun>
>
>
> Which is odd.
>
I have to correct myself.

My original note was that

(setq calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
                    "Donnerstag" "Freitag" "Samstag"]
       calendar-month-name-array ["Januar" "Februar" "Maerz" "April"
"Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember"])

in .emacs would have an effect on date stamps.

I found that this is not true. It seems to affect Org Agenda, e.g.

Week-agenda (W37):
Montag      7 September 2020 W37
Dienstag    8 September 2020
Mittwoch    9 September 2020

The names of the weekdays in date stamps seem to be unaffected by setq
calendar-day-name-array. So I don't know, why they are in German at my
computer.

regards,
Heinz


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Some progress]
  2020-09-06 22:19         ` [Some progress] Heinz Tuechler
@ 2020-09-07  6:49           ` Uwe Brauer
  0 siblings, 0 replies; 11+ messages in thread
From: Uwe Brauer @ 2020-09-07  6:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]


> Uwe Brauer wrote/hat geschrieben on/am 06.09.2020 17:49:
> I have to correct myself.

> My original note was that

> (setq calendar-day-name-array ["Sonntag" "Montag" "Dienstag" "Mittwoch"
>                    "Donnerstag" "Freitag" "Samstag"]
>       calendar-month-name-array ["Januar" "Februar" "Maerz" "April"
> "Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember"])

> in .emacs would have an effect on date stamps.

> I found that this is not true. It seems to affect Org Agenda, e.g.

> Week-agenda (W37):
> Montag      7 September 2020 W37
> Dienstag    8 September 2020
> Mittwoch    9 September 2020

> The names of the weekdays in date stamps seem to be unaffected by setq
> calendar-day-name-array. 

This is what I expected!

> So I don't know, why they are in German at my
> computer.

It is done by this setting 

  (set-language-environment "German")
  (set-locale-environment "de_DE.UTF-8")

I did not realized that this  local environment was not properly
installed in my Ubuntu system. Now everything works as expected.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-07  6:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06  9:15 org-time-stamp in German or Spanish or Uwe Brauer
2020-09-06 10:50 ` Heinz Tuechler
2020-09-06 12:01   ` Uwe Brauer
2020-09-06 12:31     ` Heinz Tuechler
2020-09-06 15:49       ` [Some progress] (was: org-time-stamp in German or Spanish or....) Uwe Brauer
2020-09-06 22:19         ` [Some progress] Heinz Tuechler
2020-09-07  6:49           ` Uwe Brauer
2020-09-06 12:53 ` org-time-stamp in German or Spanish or Stefan Nobis
2020-09-06 15:58   ` Uwe Brauer
2020-09-06 16:17     ` Stefan Nobis
2020-09-06 17:43       ` [solved it] (was: org-time-stamp in German or Spanish or....) Uwe Brauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).