I would like to use
org-capture to quickly store appointments in a journal file, and add a timestamp so that the appointment appears in my agenda. I'm using the following template:
;; excerpted from my .emacs-custom.el (custom-set-variables '(org-capture-templates ("a" "Appointment" entry (file+olp+datetree "~/org/journal.org") "* %? %T" :time-prompt t))))
This almost works.
file+olp+datetree automatically places the new appointment at the correct spot in a date-tree, I am prompted for the actual date and time to use due to
:time-prompt t, and the item has a time stamp inserted via the
%T in the template.
The only hitch is that if I enter a time range (as for a meeting that will take 30 minutes):
<2019-09-18 Wed 12:30-13:00>
The time is truncated in my item to:
<2019-09-18 Wed 12:30>
So I have to manually add the time range myself.
Looking into the source code, it looks like
org-capture-set-target-location explicitly cuts off the second part of a time range. That makes sense for the date-tree headings, but it breaks my scheduled timestamp.
Before I start hacking away at the org source code, I wonder if there's a way to accomplish this more directly. Specifically, what I would like:
- Get a prompt for a date and time, which could include a time range.
- Fill in an org entry, which includes the time I selected as a timestamp.
- Store the entry in a date-tree structure in an org file.
What I don't want is to enter the date twice (once for the date-tree, once for the schedule), or to manually fix the date after the entry is created.
To clarify, I want the items stored in a date-tree structure so I can browse through this one file to review my past and coming appointments. I want to add the time stamp so the entries will appear in my org-agenda at the appropriate time and date.