[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: org-capture-templates with %^t

From: Matt Lundin
Subject: Re: [O] Bug: org-capture-templates with %^t
Date: Fri, 06 Oct 2017 10:20:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Matt Lundin <address@hidden> writes:

> Matt Lundin <address@hidden> writes:
>> After commit 51b431d01365211d4c40b07729d5d11d82b9dfe2,
>> org-capture-templates containing %^t do not work as expected.
>> With this capture template, I am prompted to enter a time via
>> org-read-date. The expected behavior is as follows:
>>  - if I enter a date and time of day, the resulting timestamp should 
>>    contain the time of day:
>>      - i.e., entering "Thu 8am" should yield "<2017-10-05 Thu 08:00>"
>> What happens now:
>>  - when I enter a date with a time of day, the timestamp is truncated
>>    and contains only a date
>>      - I.e., entering "Thu 8am" now yields "<2017-10-05 Thu>"
> There is a further bug here. With the capture template above, if I enter
> a time range - i.e., an end time - the timestamp in the capture buffer
> is incorrect.
> Entering... "Thu 8am-10am" yields...
>  <2017-10-05 Thu-10:00>

Attached please find a patch that fixes these issues. It is a simple
change, but it brings the behavior of %^t and %^u vs. %^T and %^U into
line with the behavior of the interactive function org-time-stamp
without and with a prefix argument.

The escapes %^t and %^u now default to no time of day if the user enters
nothing but allow the optional entry of a time of day via user

The escapes %^T and %^U always include a time of day, with or without
user interaction.


Attachment: 0001-Fix-interactive-timestamp-entry-in-capture-templates.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]