[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] Undocumented convention for org-time-stamp-custom-formats to b
From: |
Tim Cross |
Subject: |
Re: [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>" (was: time-stamp in DONE tag is not really displayed) |
Date: |
Tue, 25 Oct 2022 12:29:52 +1100 |
User-agent: |
mu4e 1.9.1; emacs 29.0.50 |
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.
>
> This is because Org expects the first and the last characters in
> org-time-stamp-custom-formats to be opening/closing brackets.
> (undocumented)
>
> 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?
Little unsure/confused regarding what is being proposed here.
- If we are removing <...>, does that mean we just retain [..] for
inactive timestamps and all other timestamps are 'active' by default?
- How will this change impact code which distinguishes active/inactive
timestamps based on presence/absence of <..> and [..]?
- What impact will this have on existing org files?
- Will this cause issues in parsing when you may have dates/times which
are not supposed to be timestamps, but will look the same as
timestamps? How will you distinguish them?
Personally, I like the clear distinction between what is a timestamp and
what isn't and what is an active timestamp and what is an inactive
timestamp.