I am trying to prompt for a timestamp to be added in the properties drawer, and to re-use the value outside of the drawer so it can be visible when reading/editing the note.
I am already using the %\N
expansion element for string prompts, and it works fine. However, when using it with a date prompt, it throws a type error
indicating the capture is expecting a string. Below is a simplified template I am trying to make work:
("l" "log" entry
(file "inbox/main.org") "* Test log \n %^{Test}t %\\1)"
:empty-lines 1)
I tried using a format-time-string
function on %\\1
thinking that maybe that would give the expected string to the program with the added benefit of being more readable. It did not work.
Is it possible to re-use the value obtained from date prompt in a capture template without prompting twice ?
%\N
mechanism cannot be used with them. You might want to post an RFE on the Org mode mailing list.org-capture-fill-template
function from the source code. The second is a function that can be used in a hook after capture. The latter only works if the date prompt sets a property value.