[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx
From: |
Morgan Smith |
Subject: |
Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx |
Date: |
Sat, 13 Apr 2024 12:08:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> 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")
>
> This is not a valid clock format. Matching such lines is a bug.
> See https://list.orgmode.org/orgmode/87wpkkhafc.fsf@saiph.selenimh/
Let me preface this defense with the fact that I don't like this format
and I don't think we should support it. Rewriting `org-clock-sum' would
be much easier if we drop support for it. However, I do believe we
currently support it.
First of all, it currently does work.
Accord to the "Version 4.78" release notes as found on worg, this is
valid.
```
- You may specify clocking times by hand (i.e. without
clocking in and out) using this syntax.
: CLOCK: => 2:00
Thanks to Scott Jaderholm for this proposal.
```
Also last time I went to rewrite `org-clock-sum' you said
(https://list.orgmode.org/orgmode/87bkg7xbxo.fsf@localhost/):
```
Further, you dropped the
((match-end 4)
;; A naked time.
branch of the code, which accounts for CLOCK: => HH:MM lines that are not clock
elements.
```