From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oMISOoQcO2KIUwEAgWs5BA (envelope-from ) for ; Wed, 23 Mar 2022 14:11:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GPTyMoQcO2LzAgAAG6o9tA (envelope-from ) for ; Wed, 23 Mar 2022 14:11:32 +0100 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 868BE36466 for ; Wed, 23 Mar 2022 14:11:32 +0100 (CET) Received: from localhost ([::1]:45310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX0lp-0007Ji-Um for larch@yhetil.org; Wed, 23 Mar 2022 09:11:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX0hF-00046x-Sy for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 09:06:41 -0400 Received: from [2607:f8b0:4864:20::42f] (port=44633 helo=mail-pf1-x42f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX0hB-0006XY-Om for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 09:06:40 -0400 Received: by mail-pf1-x42f.google.com with SMTP id u17so1438847pfk.11 for ; Wed, 23 Mar 2022 06:06:32 -0700 (PDT) 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=Ve8Axt4HG8H4j9M95QK7f/QbnNvo90k5wX6RPIG0c3M=; b=g8aAEGNwfsC0x8BVQEphiYY9wBG/QM3coR+ENtHVv5Mtk+FGn7bEQqcO9nMBxSEkcM 5ruUI2m1rwD0WHO5ITqIP+ht0Rqpat8mAsCCiTTkFNXwEqxJJwZcK/Vc+AE6Bal9DXyz gI8QOo/NE8mzzwIDgB6wlrYcHI/CjcMaefm3TYE67szh6w8SuP/zr+cB9AK+kHB6mSVk mwTsyQZruA05M1JjZyU5bODol/0kh5vjS+H37NL6FltAIZ2fVGrr6SY3Noa8KGMWY/OG jZyTqI9M8P2LaqPz8e/SOwK+M/5jzMWA1CXxtz5vp2iTnoFSqCE019y3dGk8HLFD6Ftd Nsng== 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=Ve8Axt4HG8H4j9M95QK7f/QbnNvo90k5wX6RPIG0c3M=; b=jj1TqqrAnoVjwMhK0lIOcKfNIblIsIbyPWFKFmUWsWeWWOazvHjA0EpF4Ev73pWWQJ zSqOsW8+nNy/Q7UuFasAMSkcINMCcYOueKcdGGGl07Vf2sTWFmxY/aOc9sN74sWhACWb q99YMBx8ykorNrXeslfmvocRq1l5DauQ/y5NHMYOvOE+TDibORSaNWSipFmcIjF9YDZZ ji3y4sYMifrGimyeLyLa38dll3aCF1kwJFrG00tB7tD03g9sjoDpg4pb3svqtk+FJmHM IAhVGQk9b1LyCX532MwqAKIAGOAG8Xd//lY098ReE6lqQvLSgb4s+D41kYPWTTvzXXfJ Nxhg== X-Gm-Message-State: AOAM530TjtmvZNRVjucSdiv94ZzCfoo9HsrSrc/QpsAo2npvtAJQMmCc 2OFDdLKmZXU89K3RUTMbqxU= X-Google-Smtp-Source: ABdhPJzBaNH9QBccdd+SV5zqWqAO6+i0j96+O6CvHdjazAt6c/c5Vx4KJLy6kZDI+FpwvjllOInVlg== X-Received: by 2002:a05:6a00:729:b0:4f7:77ed:c256 with SMTP id 9-20020a056a00072900b004f777edc256mr34378220pfm.1.1648040791675; Wed, 23 Mar 2022 06:06:31 -0700 (PDT) Received: from localhost ([209.95.60.92]) by smtp.gmail.com with ESMTPSA id nu16-20020a17090b1b1000b001c77c6a391csm3120298pjb.26.2022.03.23.06.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 06:06:30 -0700 (PDT) From: Ihor Radchenko To: Nicolas Goaziou Subject: Re: Timestamp parsing inside node properties and other contexts out of org-element-object-restrictions In-Reply-To: <877d8llha9.fsf@nicolasgoaziou.fr> References: <87v8wje4nd.fsf@localhost> <066001d83d3c$7b463380$71d29a80$@tomdavey.com> <87tubqmi94.fsf@localhost> <87r16umhnj.fsf@localhost> <877d8llha9.fsf@nicolasgoaziou.fr> Date: Wed, 23 Mar 2022 21:06:54 +0800 Message-ID: <871qysu8b5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 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.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Ignacio Casso , emacs-orgmode@gnu.org, tom@tomdavey.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648041092; 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=Ve8Axt4HG8H4j9M95QK7f/QbnNvo90k5wX6RPIG0c3M=; b=DCaqyggtbZHcKZkdGaL5x179Tp0Sr5+8G18uY3cdKK4xkiUkVJ/h/gTA+K6cGARcruEbco GLSR/T6N84yYI68o/0EZSsXLIidsOOn/iuQG1cqJAvXGJMRFagQ7799ZW3A4LriQUQepm8 wGD+M41WtJBDy3vSdpsycmcJgCCeaKPv1z6E+DC7cuGaByGt/BjLYp1FN0d/4oMBxnsFAi VogLednWSvDtIgOwiFrpjrTYVouKod0PnUhQ5WSYraG+fgsXPx36CbbiUHsR63FHTcGEJn Mf2Q7hvTYX9piHCPFNPJ9QW5F96cRvfk9LMM+c5vNiQ7Xl/2Is3IH4Q2cz5fkg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648041092; a=rsa-sha256; cv=none; b=IZCjLEeVLhzcxRsbtatoJGFpQxDmGvLdU1aDf4UKk4XZKzfVu4ped1aW8QDmq222xpPx8F 2j54VnhsjaHT+Latnq7MQuszKHbviaf4ZShfN0J3+spG5b9atL/EoWHa3GS+Au+hH2bTan qeFqamXoTTEoqgjeeiusJP1ip4zH7D+FCrk0jB4+Z9t/IA7SZWlukJ1Ip2K46YkakMpr7o RI3rWYU5wDPJHQYry24QzXvM/J7rrqwrMSHMkGECiLy1Jqc0jY2pStrvuiCsdkZ4ABSBKE XlPRCTJYynHm92IFA2dhyRUce8Xg72eCLA+JW0wRZ4U1ZhruzffK1mmERCjbBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=g8aAEGNw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 6.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=g8aAEGNw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: 868BE36466 X-Spam-Score: 6.60 X-Migadu-Scanner: scn1.migadu.com X-TUID: tshxcovY7uFd Nicolas Goaziou writes: > Ihor Radchenko writes: > >> So, depending on the current command, Org may on may not treat objects >> matching org-ts-regexp-both as timestamps. >> >> This situation complicates syntax and makes org-element unreliable when >> dealing with Org buffers. > > This is orthogonal to syntax. I think the docstring of that predicate is > clear: `org-at-timestamp-p' is a convenience function for broader uses > of timestamps, which existed before Element. Let me clarify. What I have in mind is my proposal about using org-element for fontification: https://orgmode.org/list/87ee7c9quk.fsf@localhost The usage org `org-at-timestamp-p' in multiple places in org.el implies that Org treats timestamp-like strings as actual timestamps even when org-element does not recognise them. Then, if, say, I implement a new fontification system purely relying on org-element, some timestamp-like strings will remain interactive (for example, using mouse context menu) but will not be fontified. Any other idea relying on org-element might also suffer from such issues. >> Should we just simply allow timestamps to be a part of node property >> values? Should we _not_ treat timestamp-looking text outside their >> allowed contexts (like quotes, source blocks, etc) as timestamps? > > Allowing Org syntax in property values is creating another set of > problems: often the value is really a string that Org shouldn't try to > interpret. Is there an easy example demonstrating the potential problem? For reference, I did try to implement parsing node-property values and even did not fail any tests, except the one directly checking the current timestamp-in-property-drawer parsing. Best, Ihor