From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 6LoBGnKvGmZ3UQEAqHPOHw:P1 (envelope-from ) for ; Sat, 13 Apr 2024 18:14:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 6LoBGnKvGmZ3UQEAqHPOHw (envelope-from ) for ; Sat, 13 Apr 2024 18:14:42 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=NjuLsYVn; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713024882; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FCjdb3Xgp0bKn6WdAtBt3SLWo9V5qeGbnpnV+pGOSmg=; b=mgBiVbjBAdxZsRAclNrQhtG1xfaakK2Pqcy0ZGWXP/03JY9dSBAWe6dk7nzUwFckEMQ6aZ CXb+yIM+1mrnrThHnZD04if0sUdpSWzX0/Kg5JPeB0vdCGAvk7CZ4UGxkJE1N8UVa9lT+D oxPoa3epyZNCyq4JIdWOuQ9EsFo9Nlyxy3yxSc6I2qmqfJfobTbGlmDpF/SCAsbuJVon6+ SWzuZgOOdtup4BqpuljciY84UXK7YgU0F48Tli0hazlQEmnFKvkPTN/5ejRvj0eaEq/X4x 7aGDhTxBag8Y8Sfuqw3ernkoGeBJUo+KTE4ELwWSGkbG046V6YPTDynOrHvSHQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1713024882; a=rsa-sha256; cv=pass; b=YyluDmJ2PM5BrmoH7+crl6yuzIhjLen23R0/bEKSnHd+6l16xtDQCLLfTPRlKbdsF7iHY+ Jj2x4qXc7c43iKxZyJuHi4GNcr+Ul5MKWn7H6HwUq86zwSQPcZqmhoPXYqXazN9yNVs8wy PE6H7D20txUvgy8gGHtNH+X9EI/dQiYTYdBHctK2CazhVyULkoz/AKf3VaIqhywTKt23kf +wY/t4HBIw58scul6Fdg/U71ZOu1iXAieZCwNpO71iiAZ28AzbPSzlsB/uZNx3dKG4GKAd ynX+RjqqpojPbcStgz34riaOwJM1kcAZWlZb4yOULpCZmGuHNbEtLFWNXgcSzw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=NjuLsYVn; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 188CD6E947 for ; Sat, 13 Apr 2024 18:14:42 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvg0w-0004f2-00; Sat, 13 Apr 2024 12:14:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvg0q-0004em-9C for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 12:13:56 -0400 Received: from mail-sn1nam02olkn20830.outbound.protection.outlook.com ([2a01:111:f400:7ea9::830] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvg0n-0004vp-Pw for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 12:13:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTKFO43FP9mrcH7HCAlrWV+fdaKiIFkYbs1E/O8nFvVJrpLKv2g3waud4AgQFFW4lO7eq85DxqNbMT3+XqXtu5kdpjVY4BprfgYSBtAxfAnmBYuQuJOQbyzkxBOZC5ez09mYLb5tPt6IFmpTueJm6h9V/4VmUVGswJ8FdfRK7JIwSMos2/Ur0N8nD+hSXUgxC7uEv8LgfQjO/G4nI8H207Onb4+FhZeSIcCr0ca8PkRiTgRu693g2KAwRIx/zg0koXlQHbH8AI62LAEH1OAWFsaHClzH5tMXYdq/g0svvu5jYaSpcmkaG8EW2Ydf4Z+/NmjAhNG/ZDqaGnR7CD+5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FCjdb3Xgp0bKn6WdAtBt3SLWo9V5qeGbnpnV+pGOSmg=; b=JkNCTbhb5jlv5cRfquC9scXSyOw98BZP9ngRbBzCRj2hapFDX0BOHgfnl/Vp1djMeIuT9tqQ3bFJYHjWsIjIh9ZRpgVYZhstMS9sBtQIfN56vuOJwbzBNk0GrjiIGiSIyhCmCRA8BqR0eQ5JTEBcwqrSY1BWlAlk+4NGSQGGx25oWMe9Ttx2gc/JJkGoosc8OVoo59RpqtJ1rbP1MeymaWMg05mUWSvIMTQPj8CnkZ1Bigk95s1bINK/+1dbZzcZAoiZB0aEAnBcl/6JpLHL3SPLvWdI0gIdKO8OSPJ5mqPSVYal1meyeZzAd6I0rvEoq226UIjvqAZuIes3NM8xuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCjdb3Xgp0bKn6WdAtBt3SLWo9V5qeGbnpnV+pGOSmg=; b=NjuLsYVngZxRELQs/vWuDnwHh4YP3SnZhqL1Qbc+yqVtyQqlfZEUO03iOHnqCumt0gTGarQNM229Ucshm/NztQ8dR2EOiNprG6w8aLrT0i8ueErjlj2CTB/n0xilDcejNnt5rgGmdw4utz+i50EEN+IAcTesKQnbTOHp4yUJonrJYzt+N9KQ/dTTj3rst3i65Sockp/YX6zUUcMSC5JUDjMNCMG6Bv33fPXbIEYtea01tiHD04bHqcToPwwdDo2C84i1NPAdmtTZKpfr+gzFaeHnl3Z/DeVcQRa5rpIXenq7mww8eVmtPXHtL41zmAtA3shIYRlDybxo+x/0TGwo/g== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by SJ0PR84MB1774.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:a03:434::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.29; Sat, 13 Apr 2024 16:08:49 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45%6]) with mapi id 15.20.7452.041; Sat, 13 Apr 2024 16:08:49 +0000 From: Morgan Smith To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx In-Reply-To: <87r0f9b9n2.fsf@localhost> (Ihor Radchenko's message of "Sat, 13 Apr 2024 14:49:21 +0000") References: <87r0f9b9n2.fsf@localhost> X-Hashcash: 1:20:240413:emacs-orgmode@gnu.org::vGd2yhISSsdYBGqW:hn0 X-Hashcash: 1:20:240413:yantar92@posteo.net::mv2SxUWji5/ZtlSb:0MDS Date: Sat, 13 Apr 2024 12:08:46 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Content-Type: text/plain X-TMN: [YYE+wkYJNDnazCxT1Ekeqdy5bePDH7Yj] X-ClientProxiedBy: YQBPR0101CA0087.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:4::20) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <87y19hkzxt.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|SJ0PR84MB1774:EE_ X-MS-Office365-Filtering-Correlation-Id: ce5c8aa1-4ca6-480d-7e88-08dc5bd40109 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IylKP31hlCe8SIOPsjvLHwR2aAuIwACZMs1kPz9G+7v8DXYvITiLE76p1Vf+zrPWncDF7MNptw36N6GfyWuu/QSA2u01/AVmJ6hpaU5KQeRiQtEPKG+SZj2Q5H+g/ORrX00sbNz3yKVo+Sw9VhMsq5rVQRG7fpFi+NrVLjSDVDWaNhGb5tgHE4tYh8IZ0j2c1s3rWotyjDjpTdpCq1rXvd2NeGTKmTRGtBpuWRwF8XW+sGgY0I6UKECUag6I9HtopE+S572pMbxE8llYapD4yF0UDdCcntbEERByKBzrm3kjyV/6lhgARN90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5lRF45UVLMcA7HYTmHOW?= =?us-ascii?Q?xo991f5YI+PVDGU5PUOPYKaJVBN88Pniy7u/1NXGN6Nyds+31a1Ud8A1yYNx?= =?us-ascii?Q?7Y5F0vlb7Vr/kSwNN1yVvSbAHEC/+DpeAdMXIRAM2RBX1aVlBfzjroD/J8wb?= =?us-ascii?Q?+U2uE9Soa5syPDiP9zG47/9GWJPiHcki/4BL40F6wlHs7M90hkNrmWzJLSQU?= =?us-ascii?Q?UcTydBV0tUhzNzAs4brv4NsHj+K40NUsGtDkASzxp6ERR2cOkEr06upkLRAd?= =?us-ascii?Q?s4YaKEkIzMlEofChvkVHMfQZukK6pfrGi5Z6UwLeJFaaWhetJJ/4nh3UUX0R?= =?us-ascii?Q?FUlgESuJDlM42QUWosOHgQdIk2V5vUyTWkVKr9IXX1EPAZzrwSuLmW5br4bo?= =?us-ascii?Q?hfOqCcdJCqyr/STKKCmXD8YKmnPBnQfOkD7rZCbUrpic7nr60SDa3RawJS/s?= =?us-ascii?Q?HCseLI7EO9yZyKn9eXOZ/EN4culW13vYDZ+ZztBvFB5Jv9VkEZefw/V2O2nY?= =?us-ascii?Q?anVQne4UlcKt9QgVWLLk0iwifdRL+K0iFuRU4ZnLpgwazfeUpbbZuZ7OdTmk?= =?us-ascii?Q?bhCb+D6oW4rd/7EiUv/qEjnBNMhW5XuMcw4tPB1RKv8uVd2ssDIu505WhrnI?= =?us-ascii?Q?FhMbVUWnlFY8z4yhCM1h4VdTYK5tn6dSMVr/aTUiu+U2xLNmbP5GIpVfll48?= =?us-ascii?Q?ItfoleSzvN7bBNXsKyR41viHeyw1gUmXLbpp7TL3zII2eciOlDs8zcEpkRxY?= =?us-ascii?Q?Zu8LQaqf8veL02GYsnJy?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce5c8aa1-4ca6-480d-7e88-08dc5bd40109 X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 16:08:49.0698 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR84MB1774 Received-SPF: pass client-ip=2a01:111:f400:7ea9::830; envelope-from=morgan.j.smith@outlook.com; helo=NAM02-SN1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.20 X-Spam-Score: -9.20 X-Migadu-Queue-Id: 188CD6E947 X-Migadu-Scanner: mx13.migadu.com X-TUID: hv8h2OcWHOVi 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") > > 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. ```