From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sAuYFY/Xn2DrNQAAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 16:15:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6EJLEY/Xn2CVawAAB5/wlQ (envelope-from ) for ; Sat, 15 May 2021 14:15:43 +0000 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 7AC0527D80 for ; Sat, 15 May 2021 16:15:42 +0200 (CEST) Received: from localhost ([::1]:52904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhv4u-0007jK-Fh for larch@yhetil.org; Sat, 15 May 2021 10:15:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhv4C-0007h8-BJ for emacs-orgmode@gnu.org; Sat, 15 May 2021 10:14:57 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:35060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lhv47-0003qV-34 for emacs-orgmode@gnu.org; Sat, 15 May 2021 10:14:56 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Fj6pq3SYPzQjmT for ; Sat, 15 May 2021 16:14:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-type:content-type:mime-version:date:date:message-id :subject:subject:from:from:received; s=mail20150812; t= 1621088080; bh=sJxDzT0mFAtCs4oURBpgNipyAsdMJhH8kChh8Ye7nug=; b=x QaXTSp+Xu5UTQlEiGB2RTyMUQDhLLY1ZvWMhPSB/Q/C1VmwStEL+aORu68knLPfc Jln+DU3831m7YWZ5m/2NzO/oZJor/lKA8f0zKALwT4kDw4v5pjWOxshlS6zUGAnt ROy/phBc5esH5kkkWQkxAyS0iD6ecMUTVmOrWZBR9AAoKL1ChKG69d4fBKovLQNO 9mOknRFp4GtYvZ6OlKi8MLPviZHAS8OPNqtqUaeLazGt9B6YA0ioyWCi4PifcN1R UFmJZrCx27z6lYghhSdQvsVSKNysBANWSFmAycdGNV5yvi5Zarkt8jpy1UtvwyC3 ZJGerVa9NAHJF9T7RkSIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1621088081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=tPAdchydINkDMlDG27eP+MKzCFwxUh05WMsoFFgJ5q8=; b=p6/O/RRE3uAYeHAA6crwFUYbNggULhckd6Jr6lJwwxN8wzxgZyB/m99VlE3W7gGgdB9vhK GWKiMb35fM1lvSOGpCWDgLdHEIUncZ5l9QFcAeRJO6+/E3rs1+x5EXnIX+I185jU4YRUiz gWGxwq174eojZJmLi5b+4sEytdEPnCpO2b6dCXH7g86uOEOTY/qxpQ91KVXMeWI6vp4xhb WwVSPCMXUC8fngg8KB2mEkGFC4yJLoqxsEjW4ZN8d2kYpBiaxOKucIzbpYAuEdDQTsXgO7 Nip/MBGxM2vMFVHfm8jIfKqRVhdPMigjnA0AM5ifQ7nWI9HXH+Tx0LpOXG6hvA== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id LEQVYaWypqFC for ; Sat, 15 May 2021 16:14:40 +0200 (CEST) To: emacs-orgmode@gnu.org From: Tim Frana Subject: [PATCH] org-agenda.el: Fix clocking issues regex Message-ID: Date: Sat, 15 May 2021 16:14:33 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3C473CEF6AA582C6B14469FF" X-MBO-SPAM-Probability: X-Rspamd-Score: -2.21 / 15.00 / 15.00 X-Rspamd-Queue-Id: 7D02117E5 X-Rspamd-UID: 6f26a6 Received-SPF: pass client-ip=80.241.56.171; envelope-from=tfr@mailbox.org; helo=mout-p-201.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621088142; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tPAdchydINkDMlDG27eP+MKzCFwxUh05WMsoFFgJ5q8=; b=a3lHvG6tyiPolDYooaN6XKG68f7YaTLhIcHEQTqjjgNYQ5aG41IIdSEC+ZWFJcXcUhYPh9 SBi87GyEiSV6eUtPAvNuuKL2B1ywAZ8PIeOLJyYIRMkjFr4YMDJBFU2DqtcSPmjTkBWHwU y6U0/FRMbCgqOnN4LJ8S/BEcovv3pkEoN2d4qRx0wRGtMv2BCulDJpqqL495BdfR0Qphwk Caqd2XlYMfqFdvkuQnJWpJgC2CNQCeqPAlgbeEtypbzDirb4kSzDPlO4PpmbUzIvJRzorr RZL7/WsTz2pPokx/eQ8HVL+jWkTU9OAX0yW6Hd5rBiI9EWVTS/wOnyZIGbEUlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621088142; a=rsa-sha256; cv=none; b=RxQEYZp4x/w+5ka6CqWn91jBQMLcsCg2op9NP+JfMLma+NxHzdbdj2Cy9Z/2xKEBQCGd1k 9wg2RPYJks5bEqzxMHtXe6DCRDvwRBEH0GX3dE2mWBAM1TGbSyIfuQEZLKGmDPKXsOQ/4N v8+HiCNG73CAfBxFIMRfJUazkBJbS1pvgaHZ3FDyyk9Ah6bdNS173sOEf9sSqH8TVjyZai JUZifXE8FhitC2mQ9vzdfyOVsqzBSb7FvbcdM2TPhtZNRT54jTlvyvYq8fGfvxe36gkM7O 90ATXnF5jEytiukcvwpq4qOJxEjMajhX6xncXp0LbkuMhlYI1UAQvQ1gJKeciA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b="x QaXTSp"; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b="p6/O/RRE"; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b="x QaXTSp"; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b="p6/O/RRE"; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7AC0527D80 X-Spam-Score: -1.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: +EKPE01mWTv7 This is a multi-part message in MIME format. --------------3C473CEF6AA582C6B14469FF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, The method org-agenda-show-clocking-issues has a faulty regex, which leads to false-positive clocking issues: " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" There is no outer group to limit the OR-expression \\|, so the right half will match timestamps with a closing parenthesis without any "Clocked" in front of it. I added a non-capturing group in the attached patch: " Clocked: +(\\(?:-\\|\\([0-9]+:[0-9]+\\)\\))". Reproduction: Define a custom agenda: (setq org-agenda-custom-commands '(("d" "Clock report for today" agenda ""                                     ((org-agenda-span 1) (org-agenda-start-with-clockreport-mode t)                                      (org-agenda-start-with-log-mode 'clockcheck))))) Use an org file that is included in org-agenda-files, and add this sample headline: Sample headline with time and closing parenthesis in it (it happened at 12:00) Clock in and out of the headline, make sure the clock timespan is at least 1 minute, and open the agenda defined above. Observe that the headline is reported as overlapping with itself, as the faulty regex will match twice on its agenda line. Best Regards, Tim --------------3C473CEF6AA582C6B14469FF Content-Type: text/plain; charset=UTF-8; name="0001-org-agenda.el-Fix-clocking-issues-regex.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-org-agenda.el-Fix-clocking-issues-regex.patch" RnJvbSBhYzM3ZWZhNTQzYWI1ODIzYjVmMmM2MjMzNmQzZTM2YjY3ZmU1MTZhIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBtb3NxdWl0by1tYWduZXQgPDI0NjU5Njk3K21vc3F1 aXRvLW1hZ25ldEB1c2Vycy5ub3JlcGx5LmdpdGh1Yi5jb20+Ck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