Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-10-07 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Russell Adams  writes:
>
>> --
>> * Fails w/o DOW, end time at 2100 not 0200
>>
>> <2022-04-28 21:00>--<2022-04-29 02:00>
>
> Confirmed.
>
> The problem is that org-ts-regexp1 does not match "2022-04-29 02:00". I
> am not sure why. org-ts-regexp1 looks like it should match the above
> case. Maybe something to do with greedy/non-greedy regexp matching, but
> its just a guess.

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=b68c1666c2be28b6e0b9fc6b1c1c863dd0d8f27c

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-04-26 Thread Ihor Radchenko
Russell Adams  writes:

> What do you recommend as the next step?

org-ts-regexp1 should be fixed. But I currently have no ideas how. The
problem is caused by some edge case in Emacs regexp parser.

Best,
Ihor



Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-04-26 Thread Russell Adams
On Tue, Apr 26, 2022 at 08:17:23PM +0800, Ihor Radchenko wrote:
> Russell Adams  writes:
>
> >> > <2022-04-28 21:00>--<2022-04-29 02:00>
> >>
> >
> > Is that technically a valid timestamp, meaning that it should be
> > recognized? Or is it just Gnus outputting a bad timestamp and I should
> > go try to adjust it?
>
> It is valid. You can check it by calling M-: (org-element-context) at
> timestamp. Our parser does recognise your example as:
>
> (timestamp
>  (:type active-range :raw-value "<2022-04-28 21:00>--<2022-04-29 02:00>" 
> :year-start 2022 :month-start 4 :day-start 28 :hour-start 21 :minute-start 0 
> :year-end 2022 :month-end 4 :day-end 29 :hour-end 2 :minute-end 0 :begin 293 
> :end 331 :post-blank 0))
>
> You can see that the end date is recognised correctly.

What do you recommend as the next step?

--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/



Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-04-26 Thread Ihor Radchenko
Russell Adams  writes:

>> > <2022-04-28 21:00>--<2022-04-29 02:00>
>>
>
> Is that technically a valid timestamp, meaning that it should be
> recognized? Or is it just Gnus outputting a bad timestamp and I should
> go try to adjust it?

It is valid. You can check it by calling M-: (org-element-context) at
timestamp. Our parser does recognise your example as:

(timestamp
 (:type active-range :raw-value "<2022-04-28 21:00>--<2022-04-29 02:00>" 
:year-start 2022 :month-start 4 :day-start 28 :hour-start 21 :minute-start 0 
:year-end 2022 :month-end 4 :day-end 29 :hour-end 2 :minute-end 0 :begin 293 
:end 331 :post-blank 0))

You can see that the end date is recognised correctly.

Best,
Ihor



Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-04-26 Thread Russell Adams
On Tue, Apr 26, 2022 at 05:43:48PM +0800, Ihor Radchenko wrote:
> Russell Adams  writes:
>
> > --
> > * Fails w/o DOW, end time at 2100 not 0200
> >
> > <2022-04-28 21:00>--<2022-04-29 02:00>
>
> Confirmed.
>
> The problem is that org-ts-regexp1 does not match "2022-04-29 02:00". I
> am not sure why. org-ts-regexp1 looks like it should match the above
> case. Maybe something to do with greedy/non-greedy regexp matching, but
> its just a guess.

Is that technically a valid timestamp, meaning that it should be
recognized? Or is it just Gnus outputting a bad timestamp and I should
go try to adjust it?

--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/



Re: [Bug] Date span failure in agenda w/o day of week in timestamp?

2022-04-26 Thread Ihor Radchenko
Russell Adams  writes:

> --
> * Fails w/o DOW, end time at 2100 not 0200
>
> <2022-04-28 21:00>--<2022-04-29 02:00>

Confirmed.

The problem is that org-ts-regexp1 does not match "2022-04-29 02:00". I
am not sure why. org-ts-regexp1 looks like it should match the above
case. Maybe something to do with greedy/non-greedy regexp matching, but
its just a guess.

Best,
Ihor