* org-time-stamp-custom-formats with out the name of the day of the week
@ 2022-08-31 15:59 Uwe Brauer
2022-09-01 7:16 ` Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2022-08-31 15:59 UTC (permalink / raw)
To: emacs-orgmode
Hi
I have set
(setq org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y"))
Now a time-stamp gets displayed (german convention)
<31.08.2022>
However when I run
org-toggle-time-stamp-overlays
I see <2022-08-21 Mi>
Which is well expected. So I am wondering, is there a way truly to have
<31.08.2022> interpreted as a org time-stamp?
Regards
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-08-31 15:59 org-time-stamp-custom-formats with out the name of the day of the week Uwe Brauer
@ 2022-09-01 7:16 ` Ihor Radchenko
2022-09-01 15:50 ` Uwe Brauer
0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-09-01 7:16 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> Which is well expected. So I am wondering, is there a way truly to have
>
> <31.08.2022> interpreted as a org time-stamp?
Timestamp format is hard-coded in Org syntax. See
https://orgmode.org/worg/dev/org-syntax.html#Timestamps
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-01 7:16 ` Ihor Radchenko
@ 2022-09-01 15:50 ` Uwe Brauer
2022-09-02 13:01 ` Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2022-09-01 15:50 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> Which is well expected. So I am wondering, is there a way truly to have
>>
>> <31.08.2022> interpreted as a org time-stamp?
> Timestamp format is hard-coded in Org syntax. See
> https://orgmode.org/worg/dev/org-syntax.html#Timestamps
I see, but I just learned that also
<2022-09-01>
Is interpreted as a timestamp not only
<2022-09-01 Thu>
However although I have set
(setq org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y")
The day of the week gets always inserted.
That is a bit inconsistent I would say.
Uwe
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-01 15:50 ` Uwe Brauer
@ 2022-09-02 13:01 ` Ihor Radchenko
2022-09-02 13:23 ` Uwe Brauer
0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-09-02 13:01 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>> Timestamp format is hard-coded in Org syntax. See
>> https://orgmode.org/worg/dev/org-syntax.html#Timestamps
>
> I see, but I just learned that also
>
> <2022-09-01>
>
> Is interpreted as a timestamp not only
>
> <2022-09-01 Thu>
Yes. Day name is optional.
> However although I have set
>
> (setq org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y")
>
> The day of the week gets always inserted.
>
> That is a bit inconsistent I would say.
I am not sure what you are referring to.
org-time-stamp-custom-formats is not changing the actual text. Just the
way timestamps are displayed when org-display-custom-times is non-nil.
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-02 13:01 ` Ihor Radchenko
@ 2022-09-02 13:23 ` Uwe Brauer
2022-09-02 13:33 ` Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2022-09-02 13:23 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>>> Timestamp format is hard-coded in Org syntax. See
>>> https://orgmode.org/worg/dev/org-syntax.html#Timestamps
>>
>> I see, but I just learned that also
>>
>> <2022-09-01>
>>
>> Is interpreted as a timestamp not only
>>
>> <2022-09-01 Thu>
> Yes. Day name is optional.
>> However although I have set
>>
>> (setq org-time-stamp-custom-formats '(" %d.%m.%Y " . " %d.%m.%Y")
>>
>> The day of the week gets always inserted.
>>
>> That is a bit inconsistent I would say.
> I am not sure what you are referring to.
> org-time-stamp-custom-formats is not changing the actual text. Just the
> way timestamps are displayed when org-display-custom-times is non-nil.
I see, the question simply is this:
How can I achieve that org-time-stamp inserts the date *without* the day
name?!
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-02 13:23 ` Uwe Brauer
@ 2022-09-02 13:33 ` Ihor Radchenko
2022-09-03 7:27 ` tomas
0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-09-02 13:33 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> I see, the question simply is this:
>
> How can I achieve that org-time-stamp inserts the date *without* the day
> name?!
This cannot currently be customized. However, you can change
org-time-stamp-formats constant. Removing the %a should be safe.
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-02 13:33 ` Ihor Radchenko
@ 2022-09-03 7:27 ` tomas
2022-09-03 13:31 ` Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: tomas @ 2022-09-03 7:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
On Fri, Sep 02, 2022 at 09:33:40PM +0800, Ihor Radchenko wrote:
> Uwe Brauer <oub@mat.ucm.es> writes:
>
> > I see, the question simply is this:
> >
> > How can I achieve that org-time-stamp inserts the date *without* the day
> > name?!
>
> This cannot currently be customized. However, you can change
> org-time-stamp-formats constant. Removing the %a should be safe.
FWIW, I have this in an (eval-after-load 'org ...)
(setq org-time-stamp-formats
'("<%Y-%m-%d>" ."<%Y-%m-%d %H:%M>"))
since years (> 5) and haven't observed any side effects. But then
I don't meet every nook and cranny of org (I bow in awe to those
who meet half of them :-)
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-time-stamp-custom-formats with out the name of the day of the week
2022-09-03 7:27 ` tomas
@ 2022-09-03 13:31 ` Ihor Radchenko
0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2022-09-03 13:31 UTC (permalink / raw)
To: tomas; +Cc: emacs-orgmode
<tomas@tuxteam.de> writes:
>> This cannot currently be customized. However, you can change
>> org-time-stamp-formats constant. Removing the %a should be safe.
>
> FWIW, I have this in an (eval-after-load 'org ...)
>
> (setq org-time-stamp-formats
> '("<%Y-%m-%d>" ."<%Y-%m-%d %H:%M>"))
>
> since years (> 5) and haven't observed any side effects. But then
> I don't meet every nook and cranny of org (I bow in awe to those
> who meet half of them :-)
This only works because you changed org-time-stamp-formats in one of the
few safe ways.
Org declares org-time-stamp-formats and Org code treats its value as a
constant making various kinds of unsafe assumptions that can break
things if the value of org-time-stamp-formats is changed. For example,
it is assumed that first/last characters are triangular brackets; it is
assumed that the output can be parsed using parse-time-string; it is
assumed that 1..11 substring in the format contains a full date; it is
assumed that the formatted output conforms to timestamp syntax; etc.
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-09-03 13:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 15:59 org-time-stamp-custom-formats with out the name of the day of the week Uwe Brauer
2022-09-01 7:16 ` Ihor Radchenko
2022-09-01 15:50 ` Uwe Brauer
2022-09-02 13:01 ` Ihor Radchenko
2022-09-02 13:23 ` Uwe Brauer
2022-09-02 13:33 ` Ihor Radchenko
2022-09-03 7:27 ` tomas
2022-09-03 13:31 ` Ihor Radchenko
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).