emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-orgmode@gnu.org
Subject: Re: [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>"
Date: Mon, 24 Oct 2022 17:21:50 +0200	[thread overview]
Message-ID: <874jvt4581.fsf@mat.ucm.es> (raw)
In-Reply-To: 87k04ppp1t.fsf@localhost

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

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

> Uwe Brauer <oub@mat.ucm.es> writes:
>> My time-stamps are of the form <2022-10-23 Sun>
>> I have an entry like this 
>> 
>> - State "DONE"       from "WAIT"       [2022-10-23 21:06] \\
>> 
>> 
>> 
>> However it is displayed when I use org-toggle-time-stamp-overlays  as
>> [23.10.%]
>> 
>> Neither the year not the time is displayed, why!
>> 
>> I have set 
>> org-time-stamp-custom-formats 
>> to 
>> (" %d.%m.%Y " . " %d.%m.%Y")
>> 
>> I am puzzled, any ideas?

> Confirmed.

thanks

> This is because Org expects the first and the last characters in
> org-time-stamp-custom-formats to be opening/closing brackets.
> (undocumented)

So this should have been the correct setting?

("<%d.%m.%Y " . " %d.%m.%Y>")

> Why?
> Because org-time-stamp-formats does so.

> Why does org-time-stamp-formats does so?
> No idea.
> This code dates back to initial Org commits.

> I think it would make sense to change it.
> However, if we change special treatment of the first/last characters in
> org-time-stamp-custom-formats, it will also make sense to change
> org-time-stamp-formats constant.

> For backwards compatibility, we will need to keep special treatment to
> strip brackets around the formats, if present.

> I propose to do the following:
> 1. org-time-stamp-formats and org-time-stamp-custom-formats will be
>    treated as is, unless they contain "<" and ">" and the first and the
>    last char.
> 2. If the formats do contain <...>, strip the "<" and ">".
> 3. Document (2) in the docstrings.

> Any objections?

To me that sounds logical.



-- 
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 --]

  reply	other threads:[~2022-10-24 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 20:32 time-stamp in DONE tag is not really displayed Uwe Brauer
2022-10-24  9:07 ` [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>" (was: time-stamp in DONE tag is not really displayed) Ihor Radchenko
2022-10-24 15:21   ` Uwe Brauer [this message]
2022-10-25  6:18     ` [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>" Ihor Radchenko
2022-10-25  1:29   ` [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>" (was: time-stamp in DONE tag is not really displayed) Tim Cross
2022-10-26  4:12     ` Ihor Radchenko
2022-10-26  4:20       ` Samuel Wales
2022-10-26  5:06       ` Tim Cross
2022-11-07  7:21   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jvt4581.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).