From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cD43FcTfnGERVQAAgWs5BA (envelope-from ) for ; Tue, 23 Nov 2021 13:34:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AG3wEMTfnGEvQwAAB5/wlQ (envelope-from ) for ; Tue, 23 Nov 2021 12:34:12 +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 D7A3D9562 for ; Tue, 23 Nov 2021 13:34:11 +0100 (CET) Received: from localhost ([::1]:49320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpUzy-0004kS-W9 for larch@yhetil.org; Tue, 23 Nov 2021 07:34:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpUyx-0004gj-S5 for emacs-orgmode@gnu.org; Tue, 23 Nov 2021 07:33:07 -0500 Received: from [2a00:1450:4864:20::232] (port=44989 helo=mail-lj1-x232.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpUyu-00006m-IF for emacs-orgmode@gnu.org; Tue, 23 Nov 2021 07:33:07 -0500 Received: by mail-lj1-x232.google.com with SMTP id 13so10726234ljj.11 for ; Tue, 23 Nov 2021 04:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=RB0n0LH/DRLOX/UzFho7cCxhLFsgcYEXUHqLARPw1Mk=; b=Q10FDaCauTCF+gt6Eix625EkcPsrpL0uSLUluI0aGh7JWA3D0S3+d22tj6i8FYpThy I4GsyjZ931i/hmXDqPRhiVAC8dHo6m1VdxPfOZQhl4U5CVgu80Ewt4yCd0VKcTfscWXX C4meH8JpsQmR9m0rtu/N1Q/VSX751lAV5r6uOrBkmmmp3sG+lUsE/ik7igN7CQ+4mNo6 dxTrj0JepYG0XdhSBmDt7jbHHeCkp3VgUu4qCbJEqT+VKNO3QL0NASp8kVdxswIkp8Nc CPSxTcjwFIwZC2Ub9LQf7hWckuEHL+rUV03zfBSXlcYUzO/KCu73kae4eEsg9CNcipk5 36pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=RB0n0LH/DRLOX/UzFho7cCxhLFsgcYEXUHqLARPw1Mk=; b=old73qCi6ozR9+FYB7GCW3LDnJqfbmvoxOtHbfSMvSpx/UaBzC5AZ1lPckmYcdUr68 q1mG7ze41I4/xBnDGyzTb5QWh10sCLCCICx6fS9tdTqwP96fN45q2AnlA30bGLjeW2cD ec/06FzMteA/FipJbADckdt3SUUZXqtdZOYkMhtawOVNqBps86VOW7mV5yR9CSheFVAm GFfAHDU6Vn99hEdwBMUVuqhwqCDkttvMnkghOebnxpw5lhQPtHp7+roYj9tpPegLezYM 8RVaaghejcyRTiN9iQuT+26DLPLjEg7ttNpUnk+Wio5TOVWBLJpzmtxsGhGuOocMJgq2 KfBQ== X-Gm-Message-State: AOAM533hZ0FXtGSKTnQYIr5vbf9fkISiN4KSccR6JmP1YwhpSmBn4xlo iqtYFw0vqC82UOoY7YGEcLk= X-Google-Smtp-Source: ABdhPJz3AH4JuHTxy5DLIkZX0vNJdWqp1mmyTDvPidG+Vnl94VSsW2kDS5YpVVd4d0o2g/LdIUIrqA== X-Received: by 2002:a05:651c:1582:: with SMTP id h2mr4726922ljq.183.1637670781808; Tue, 23 Nov 2021 04:33:01 -0800 (PST) Received: from localhost ([141.105.67.194]) by smtp.gmail.com with ESMTPSA id z24sm1278676lfh.289.2021.11.23.04.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 04:33:01 -0800 (PST) From: Ihor Radchenko To: William Denton , Nicolas Goaziou Subject: [PATCH] "Cache corruption detected" when editing CLOCK timestamp by hand In-Reply-To: <87tuh88kjv.fsf@localhost> References: <87wnm48ldv.fsf@localhost> <87tuh88kjv.fsf@localhost> Date: Tue, 23 Nov 2021 20:34:27 +0800 Message-ID: <87v90j2gq4.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::232 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=yantar92@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org 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=1637670851; 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=RB0n0LH/DRLOX/UzFho7cCxhLFsgcYEXUHqLARPw1Mk=; b=bC8Yq2GNstPljm/Oclponn+IE4E3/GnRqQiVoePOsZwhBmkqvrkjGHdZej6KB78YOgj//T NNqW4zFs2UgOJsKHjW+WZnN3W9oPt4LqhDsufYKhjwIthfIUdy76zR0BafcY9YegmG8uLR MdZwGKzcbotQJM0u8uO+5QfS53EbKR2wlYP/6fqHzf3F9ttvkkQBxThdQvp22uG+xlyVak 7aPrugstC3bNmG4zuWapY72lCNTFXhTtvbpyO0oRyNkz8OQEpea28Ag0o15smxUn/HgU4p kPExiWQ6clsn7Q+Bclxg4XSYtRgN/lZeiePSjWRhBU11q09VKQpBmRZqCAFTNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637670851; a=rsa-sha256; cv=none; b=dGzbpIdDzobiMmw1dMbhuLZx4oIM4ll4QNDtEIy8teSRFYeJuIiJhkFwEUTBSBvDBzk7xM XTPTBPAMKVazYVpD9Vj6JBfUqNvz5l+d9ILL2Su2Kr6pkiTV50Dac9dNdjIzVnLnQzC1Wl ul3282fm7wzlpXcbDPz0w+6CNQd6Ybx2uW4VaAYFs6lBh0/gnEYwxF5KTDhSsCdCRyDVF9 ym0s3D8HeLd1gWBnZVGFNk70Q5gQNAFodrX/y0hRuhwsO/5heoIBRjKWeiwtO5VrD/cHo9 3t3ApyclapMUD5D91Hd1H2xQ37quzun/rHCJ8ue+Hngq3XdEGAvD8vYE41zbzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Q10FDaCa; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.58 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Q10FDaCa; dmarc=pass (policy=none) header.from=gmail.com; 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: D7A3D9562 X-Spam-Score: -3.58 X-Migadu-Scanner: scn1.migadu.com X-TUID: OvixCS8nnN0A --=-=-= Content-Type: text/plain Ihor Radchenko writes: > This looks like a bug in org-element-timestamp-parser > > Minimal reproducer: > > 1. Create an empty org file and open it > 2. Yank the following string: "CLOCK: [2021-10-22 Fri 10:41]--[2021]" > 3. M-: (org-element-at-point) The attached is tentative fix for cases like the above. It gets rid of the observed error, however I am not sure if the clock line parser returns a reasonable value is such case. With the patch, org-element-at-point returns (clock (:status running :value (timestamp ( :type inactive :raw-value "[2021-10-22 Fri 10:41]" :year-start 2021 :month-start 10 :day-start 22 :hour-start 10 :minute-start 41 :year-end 2021 :month-end 10 :day-end 22 :hour-end 10 :minute-end 41 :begin 301 :end 323 :post-blank 0)) :duration nil :begin 294 :end 331 :post-blank 0 :post-affiliated 294)) Should we consider the above CLOCK line as a valid running clock or maybe it should be parsed as a paragraph? Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-element-Fix-org-element-timestamp-parser-for-inc.patch >From 91749491eb95cf1088fbe5a479eb30816478dba7 Mon Sep 17 00:00:00 2001 Message-Id: <91749491eb95cf1088fbe5a479eb30816478dba7.1637670436.git.yantar92@gmail.com> From: Ihor Radchenko Date: Tue, 23 Nov 2021 20:25:41 +0800 Subject: [PATCH] org-element: Fix org-element-timestamp-parser for incomplete ranges * lisp/org-element.el (org-element-timestamp-parser): Use more strict regexp to match second timestamp in timestamp--timestamp range. Fixes https://list.orgmode.org/orgmode/87tuh88kjv.fsf@localhost/ --- lisp/org-element.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index b47fba9eb..b40ff2d33 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3900,7 +3900,9 @@ (defun org-element-timestamp-parser () (activep (eq (char-after) ?<)) (raw-value (progn - (looking-at "\\([<[]\\(%%\\)?.*?\\)[]>]\\(?:--\\([<[].*?[]>]\\)\\)?") + (looking-at (concat "\\([<[]\\(%%\\)?.*?\\)[]>]\\(?:--\\(" + org-ts-regexp-both + "\\)\\)?")) (match-string-no-properties 0))) (date-start (match-string-no-properties 1)) (date-end (match-string 3)) -- 2.32.0 --=-=-=--