emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* the change in org-time-stamp-custom-formats
@ 2023-05-09 13:33 Uwe Brauer
  2023-05-09 13:45 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2023-05-09 13:33 UTC (permalink / raw)
  To: emacs-orgmode


Hi

I just read in the news that 
the Leading =<= and trailing =>= in the default values of
~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are
stripped.

No changes on the user side are needed if
~org-time-stamp-custom-formats~ was customized.

But I have files with the setting

#+begin_src emacs-lisp :results silent :exports none
(custom-set-variables
 '(org-display-custom-times t)
 '(org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%Y %I:%M %p>")))
#+end_src


Should I change that to 
 '(org-time-stamp-custom-formats '("%d.%m.%Y" . "%d.%m.%Y %I:%M %p")))

-- 
Warning: Content may be disturbing to some audiences
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. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/



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

* Re: the change in org-time-stamp-custom-formats
  2023-05-09 13:33 the change in org-time-stamp-custom-formats Uwe Brauer
@ 2023-05-09 13:45 ` Ihor Radchenko
  2023-05-09 14:12   ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-05-09 13:45 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

> But I have files with the setting
>
> #+begin_src emacs-lisp :results silent :exports none
> (custom-set-variables
>  '(org-display-custom-times t)
>  '(org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%Y %I:%M %p>")))
> #+end_src
>
>
> Should I change that to 
>  '(org-time-stamp-custom-formats '("%d.%m.%Y" . "%d.%m.%Y %I:%M %p")))

You can. Or you can leave things unchanged.

What we now do with these values is

;; Strip brackets, if any.
    (when (or (and (string-prefix-p "<" format)
                   (string-suffix-p ">" format))
              (and (string-prefix-p "[" format)
                   (string-suffix-p "]" format)))
      (setq format (substring format 1 -1)))

So, brackets, if any, are stripped.

-- 
Ihor Radchenko // yantar92,
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] 5+ messages in thread

* Re: the change in org-time-stamp-custom-formats
  2023-05-09 13:45 ` Ihor Radchenko
@ 2023-05-09 14:12   ` Uwe Brauer
  2023-05-09 14:25     ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2023-05-09 14:12 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> But I have files with the setting
>> 
>> #+begin_src emacs-lisp :results silent :exports none
>> (custom-set-variables
>> '(org-display-custom-times t)
>> '(org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%Y %I:%M %p>")))
>> #+end_src
>> 
>> 
>> Should I change that to 
>> '(org-time-stamp-custom-formats '("%d.%m.%Y" . "%d.%m.%Y %I:%M %p")))

> You can. Or you can leave things unchanged.

Well if I don't change I see the time stamps like this 
<<09.05.2023 >
instead of

<09.05.2023>

When I use org-toggle-time-stamp-overlays
to toggle the overlays on
-- 
Warning: Content may be disturbing to some audiences
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. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: the change in org-time-stamp-custom-formats
  2023-05-09 14:12   ` Uwe Brauer
@ 2023-05-09 14:25     ` Ihor Radchenko
  2023-05-09 14:55       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-05-09 14:25 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

>> You can. Or you can leave things unchanged.
>
> Well if I don't change I see the time stamps like this 
> <<09.05.2023 >
> instead of
>
> <09.05.2023>
>
> When I use org-toggle-time-stamp-overlays
> to toggle the overlays on

I am unable to reproduce.

I did

1. /tmp/bug.el
(custom-set-variables
 '(org-display-custom-times t)
 '(org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%Y %I:%M %p>")))

2. /tmp/bug.org
* This is test
SCHEDULED: <2023-05-09 Tue>
<2023-05-09 Tue> <2023-05-09 Tue 16:24>
[2023-05-09 Tue] [2023-05-09 Tue 16:24]


3. make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
4. M-x org-toggle-timestamp-overlays

-- 
Ihor Radchenko // yantar92,
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] 5+ messages in thread

* Re: the change in org-time-stamp-custom-formats
  2023-05-09 14:25     ` Ihor Radchenko
@ 2023-05-09 14:55       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2023-05-09 14:55 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>>> You can. Or you can leave things unchanged.
>> 
>> Well if I don't change I see the time stamps like this 
>> <<09.05.2023 >
>> instead of
>> 
>> <09.05.2023>
>> 
>> When I use org-toggle-time-stamp-overlays
>> to toggle the overlays on

> I am unable to reproduce.

> I did

> 1. /tmp/bug.el
> (custom-set-variables
>  '(org-display-custom-times t)
>  '(org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%Y %I:%M %p>")))

Uff I need to cook up a recipe and come back to you.
I hope it is not something in my init files 
but I started to notice that problem only after I pulled and installed
a recent master version, hm.
-- 
Warning: Content may be disturbing to some audiences
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. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

end of thread, other threads:[~2023-05-09 14:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 13:33 the change in org-time-stamp-custom-formats Uwe Brauer
2023-05-09 13:45 ` Ihor Radchenko
2023-05-09 14:12   ` Uwe Brauer
2023-05-09 14:25     ` Ihor Radchenko
2023-05-09 14:55       ` 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).