From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GBGCCZMqHWV0aAAAauVa8A:P1 (envelope-from ) for ; Wed, 04 Oct 2023 11:04:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GBGCCZMqHWV0aAAAauVa8A (envelope-from ) for ; Wed, 04 Oct 2023 11:04:19 +0200 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 B5E9759D92 for ; Wed, 4 Oct 2023 11:04:18 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=dg48t+MK; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696410259; 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=lsc8uIoIr/6NDZpYwN7allnmzEvcC8g5GU9bXcv0dzc=; b=ifzy/oP//bXVKNPkZstL2Jlf1HNnlAkGk3eDpQ/83ARyr/dLAQoJhxz8adHqVMBB9igCFH mS+U3hMTxCarWLUQ5H9fSIw5+VOhR+RGIBigGhRv8Kjm1Zjy7RqCfmF0E1pY/wGoW+SlPY Dy6qjrQkm9zvYgl2HcLGdMgT5wWLvz+8L5G6zq2qWefYY49Sc6jopSQUuJEzgNbHGNi5od +Dvhqzv3shPpaChWMe6nN3W0BdcvjkKF7yrDkYCckt0iQBvmiEQjkeZ41pj4qiotv2P9Ty NN/eByhOvBzXta/YTA8mHvL2B0NE0cUflV/6eq4m2nOaB3x+nIPiu8KyrToFXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=dg48t+MK; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696410259; a=rsa-sha256; cv=none; b=NQq8NM3Rvq3pCNAPssgpw+nVyJoqUts+jzeOJbitkLoIPt+hjndRTHhJACT/EKMGXprujI UVZ0T2xxBoM7LXZaT0NHkvlhcdvB58kZgQT/KeaaHYJ/7y1GUaRpD6FfK9PnasxZcuzu5X Z8OtCjGbFWFOitR0wzHAD/KmHj6WvJgit7ET5UqnklPSELdMDMmvtwWXai9rUzbhokeKu8 KE1cYFL139N4wpc1ioe64Rd85TFf4i1QK5QGOC+LFC/k02v7WYrguPoqDxu6BiMw+cZ+or TjCuONuGM+ETc9qsjqoj0uia6LfSN8C6IAI0ygFLGbJipghgV2f4HhtcHRcqRw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnxkn-0006VW-Gy; Wed, 04 Oct 2023 05:01:13 -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 1qnxkV-0006LR-N7 for emacs-orgmode@gnu.org; Wed, 04 Oct 2023 05:00:56 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnxkR-0002pb-Gl for emacs-orgmode@gnu.org; Wed, 04 Oct 2023 05:00:55 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 33786240028 for ; Wed, 4 Oct 2023 11:00:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696410049; bh=6uYL2JCfwyxcuLo2C3BZlOjfWaI3PNgxesKKv4OqBiI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=dg48t+MKtGBkjZoPiKmzAo0+o9JQbZkpuIr0Y9vKVgeDRyVLojty1vRO8jmutWI3p pFN/MYAE4UTehXwMv9W8hYitwRbKrXyldX4zAJdcDJ2dxYZBif+fFwhZ0HW5bVtI6B dTFKw6LbFj+ud8w43kDu8HDIqUUJ8a+4wQ6u/R39VbxmpHYcug3fHp/AzZGDEvfnz3 UmDP/n8m4Cz5tJyyEJpJJ6oVejPbHJOfH9EgSibbbkiyzCM4TQTW8yXWn0zOffyO2A kn0b/DStrBDpx8phXs9Pf78Q2SBns86fqIu+YidWGVPWveuVF2vpFxMThtdlvQnHx0 EbKMl1klD3Dnw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S0pZ84Qljz9rxF; Wed, 4 Oct 2023 11:00:48 +0200 (CEST) From: Ihor Radchenko To: Tom Alexander Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Clarify that REST is not supported on the start TIME in a time-range timestamp. In-Reply-To: References: Date: Wed, 04 Oct 2023 09:02:25 +0000 Message-ID: <87bkdeoj4u.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.17 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: B5E9759D92 X-Spam-Score: -7.17 X-TUID: mbno2mQ5Wnsx "Tom Alexander" writes: > Potentially related, org-mode is accepting this malformed timestamp from[1]: > ``` > <2016-02-14 Sun ++y> > ``` > > The org-mode documentation[2] only includes REST with TIME, defining TIME as "H:MMREST". The above does not have any TIME but it accepts the timestamp anyway: > ... > Perhaps that grammar is wrong and REST needs to be separated from TIME? We have no internal consistency here, AFAIR. The actual matching is done with (defconst org-element--timestamp-regexp (concat org-ts-regexp-both "\\|" "\\(?:<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)" "\\|" "\\(?:<%%\\(?:([^>\n]+)\\)>\\)") "Regexp matching any timestamp type object.") with org-ts-regexp-both matching (rx (seq (= 4 digit) "-" (= 2 digit) "-" (= 2 digit) (optional " " (*? nonl)))) (and also brackets) Then, `org-element-timestamp-parser' looks for DATE/TIME/REPEATERS/etc inside the above match, disregarding any order: (string-match "[012]?[0-9]:[0-5][0-9]\\(-\\([012]?[0-9]\\):\\([0-5][0-9]\\)\\)" date-start) (string-match "\\([.+]?\\+\\)\\([0-9]+\\)\\([hdwmy]\\)" raw-value) (string-match "\\(-\\)?-\\([0-9]+\\)\\([hdwmy]\\)" raw-value) However, not all the Org code is using org-element parser yet. Certain parts of Org are matching manually using a separate, more strict regexps, like org-ts-regexp0, org-ts-regexp1, ... So, we chose to use a more strict definition in org-syntax for the time being, before we consolidate things together in more uniform ways. As for the problem with REST you raised, I am inclined to remove it from syntax doc for the time being - it only creates more confusion, unfortunately. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at