Re: [O] time range, timestamps // was: docstring typoes in org-read-date-force-compatible-dates

2019-01-05 Thread Kyle Meyer
Van L  writes:

[...]

> I am muddling my way through
>
>  [info:org#Creating timestamps]
>  [info:org#The date/time prompt]
>
> and see that org-evaluate-time-range does nothing for
>
> <2019-01-04 Fri 11:00-12:15>

It looks like org-evaluate-time-range uses org-at-date-range-p, which
matches only the timestamp--timestamp range style.  I'd guess that the
easiest way to make org-evaluate-time-range support the single timestamp
range variant would be to update it to use the org-element api (e.g.,
org-element-context reports the above timestamp as :type active-range).

-- 
kyle



[O] time range, timestamps // was: docstring typoes in org-read-date-force-compatible-dates

2019-01-03 Thread Van L


> Kyle Meyer wrote:
> 
> In the future, please send
> generated patches with git format-patch so that they include a commit
> message (see 
> for instructions).

Thanks Kyle. Noted.

I am muddling my way through

 [info:org#Creating timestamps]
 [info:org#The date/time prompt]

and see that org-evaluate-time-range does nothing for

<2019-01-04 Fri 11:00-12:15>

which was created using the “11am+2:15” style from

— quote
   You can specify a time range by giving start and end times or by
giving a start time and a duration (in HH:MM format).  Use one or two
dash(es) as the separator in the former case and use ’+’ as the
separator in the latter case, e.g.:

 11am-1:15pm⇒ 11:00-13:15
 11am--1:15pm   ⇒ same as above
 11am+2:15  ⇒ same as above

   Parallel to the minibuffer prompt, a calendar is popped up(2).  When
you exit the date prompt,
— quote ends

exporting that to ASCII in a buffer transforms the time range to

<2019-01-04 Fri 11:00>–<2019-01-04 Fri 12:15>

Now, that formatting put back in the Org buffer does work for 
org-evaluate-time-range, as follows:

<2019-01-04 Fri 12:34>-<2019-01-04 Fri 12:35> 00:01

;; Using the C-u C-c C-y