Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-14 Thread Ihor Radchenko
Ihor Radchenko writes: > So, in the message I linked, Nicolas (the major Org mode contributor) > was not right. I hence need to fix the parser and update Org syntax > page. This includes fixing `org-element-clock-line-re' to account for > CLOCK: => 1:00 syntax. I changed the parser on main.

Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-13 Thread Morgan Smith
Ihor Radchenko writes: > So, in the message I linked, Nicolas (the major Org mode contributor) > was not right. I hence need to fix the parser and update Org syntax > page. This includes fixing `org-element-clock-line-re' to account for > CLOCK: => 1:00 syntax. Cool. I guess ping this thread

Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-13 Thread Ihor Radchenko
Morgan Smith writes: >>> - (goto-line 2) >>> + (insert (org-test-clock-create-clock ". 1:00" ". 2:00") >>> + "CLOCK: => 1:00\n") >> >> This is not a valid clock format. Matching such lines is a bug. >> See https://list.orgmode.org/orgmode/87wpkkhafc.fsf@saiph.selenimh/ > >

Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-13 Thread Morgan Smith
Ihor Radchenko writes: >> * testing/lisp/test-org-clock.el (test-org-clock/clocktable/insert): >> Add a clock time that does not include timestamps. >> ... >> - >> - (goto-line 2) >> + (insert (org-test-clock-create-clock ". 1:00" ". 2:00") >> + "CLOCK: => 1:00\n") > >

Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-13 Thread Ihor Radchenko
Morgan Smith writes: > See two attached patches. All tests pass on my computer. > > Every once in a while I feel obligated to go back to org-clock-sum to > try and optimize it. I have a file with 8 clocktables in it and it > takes forever to update. This time I decided instead of trying to >

[PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-04-11 Thread Morgan Smith
Hello! See two attached patches. All tests pass on my computer. Every once in a while I feel obligated to go back to org-clock-sum to try and optimize it. I have a file with 8 clocktables in it and it takes forever to update. This time I decided instead of trying to optimize, I'm just going