From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id APndMn1U82NdBwAAbAwnHQ (envelope-from ) for ; Mon, 20 Feb 2023 12:07:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mMHwMn1U82P7LwAA9RJhRA (envelope-from ) for ; Mon, 20 Feb 2023 12:07:41 +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 785823DC74 for ; Mon, 20 Feb 2023 12:07:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU40Q-0002Pf-RH; Mon, 20 Feb 2023 06:06:50 -0500 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 1pU40M-0002Mp-De for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 06:06:47 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU40K-0005Eq-A4 for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 06:06:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 99DBC240267 for ; Mon, 20 Feb 2023 12:06:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676891200; bh=NFkwaPMdKlHwyCQ7l+gqP6d5j8Qi0k1TEM6xguQeuSo=; h=From:To:Cc:Subject:Date:From; b=UFA1tjRQg2mLyNEKysNW5AV9avsoSDDbZKlC88s9NFCwAvauwCtVJazSfHvPLwOjr FGR2tlrEr4SxmGyAq5OprmDFZQLCo+t3JlYkcVfXyJ4RKkqsV7YUOaa6RUW4+AWW1t YZX6xEAzq2jS9sqy3uAiz+4S1sP11gqKZ+RDQFndHL05CHGoHqbgBLZsx0DcE9hB7X uI8rd+2NohO8ERgQiNQevQNKyPmhYmUZtjXpWp8SrSE+bkhKRmbE79WoYaIlzTbNs4 H37J+yXP4KuZfoVumDwX9UECNcylSq0rYUbrKHgYQN+7KoeyxUxNh35OfTBLvQ95QI xJ6t2TWhEGcaQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PL03f5JXPz9rxH; Mon, 20 Feb 2023 12:06:38 +0100 (CET) From: Ihor Radchenko To: Ilya Chernyshov Cc: emacs-orgmode Subject: Re: [PATCH] org-element-timestamp-interpreter: Return daterange anyway, if DATERANGE is non-nil In-Reply-To: <87y1ot6dqz.fsf@gmail.com> References: <87y1ot6dqz.fsf@gmail.com> Date: Mon, 20 Feb 2023 11:07:19 +0000 Message-ID: <87wn4cegt4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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_H2=-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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676891261; 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=BMqr2mMGSZ+R0V4Z69eNqdQE5Nr2jVfIaQGzwnz4AJc=; b=BwVfUPJQVGMB9sY8elbM2EMEuIhCuGp3QrZwEV/bNdx2hVEdhLD3P470G89lgIkslEQnJ3 lT8IyTb50Aq2434sjqXdgRcFcO/+a510mNorur2106m3g6Z6MZltGEls2tTJ3qrlknrwgC rnAIn6PrpYc3+mvSK/x8fVuEsxOfldHJzbt9UkZdUTS3WAr0q0DXqx75oiItzsPmCKQFKQ vKj0NmooZOtfbmhVyCFt5SvGk61m7kZtsh2y0r3sU+au/ZBMiXxkHkEkNfShzrKrOQJn19 7y/SR4egAYuOWkkoROM/9Esml0QYH//w/1F4MzqugObFDpc3xa8202xS4HhPzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UFA1tjRQ; 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=1676891261; a=rsa-sha256; cv=none; b=bA/rpRV0XXiIpL4R5eGsjgu3+SxAiig3cFNih3NP/Nbz+Pf9NBA3MT7AGMoK8KM7z9T4E4 u6Ntns37NCGy20j1qblfT4njO/DLZrEt8IEhS2c6vdVDwA5+EGDm3zhYhu9n0GtTAH/0km K6LkpSPNqUfsZDmtudPPgKKOmatvupqft++fECBgvrgGACzmF454QyAkVuJkBjFALQvqYH xHqizeEK9b32cBHpEAov2gRI+uwuBSlqva8PywASC3DOakwHlzA9Hc6m7qWkzrSHqC6fRV jui6dgTEYM1G6dhr88O9vHzaCui9zUsB4EkEdTK2hbf21IbyZ48Wm6nX6O0pMw== X-Migadu-Spam-Score: -6.88 X-Spam-Score: -6.88 X-Migadu-Queue-Id: 785823DC74 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UFA1tjRQ; 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 X-TUID: 2qCmaAzKTfzs Ilya Chernyshov writes: > So, an option is needed that controls whether to return a > daterange > (even it's possible to return a timerange) or a timerange (if the > dates > in the range are equal). > > I wrote a patch that handles this problem, could you please review > the > code and give some advice to improve it? What about recording the type of timestamp range in the parser? Then, interpreter can simply examine the range type and emit the correct timestamp string. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at