From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sOwvAeWh82NWaQAAbAwnHQ (envelope-from ) for ; Mon, 20 Feb 2023 17:37:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iMMwAeWh82NPWgEA9RJhRA (envelope-from ) for ; Mon, 20 Feb 2023 17:37:57 +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 8DDB48FFF for ; Mon, 20 Feb 2023 17:37:56 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NYYjlj0b; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676911076; a=rsa-sha256; cv=none; b=GTb/eeZp2rQfIb7BeHVGZ8ef9c+vEBB7tIUO7BYbKSMwM1o27PJxBJHbCJvPfZCjt45O+n Qio8Fhcahyy1Q5dyxQY81ZtL24C8WD90k+01ctipH8RRYXpiiz19z1D9Qxi5zIJxeiD+5e 0oe16zRB2SUPMPFiMioAseu7DsMdLXe6x7ChnErDRrvr3mTEecZG/b7/ihBgKBbohKQiR0 3wismjBesczhK8s403RWNTtD54uN8pTZheLwaFZZevtClAx96QHlRgkLRMTcd4hamffs5b HTqH1M+J0aJmegXEquztnzaKeliMiAVtixy06pNMurFwguSYXExq55shJhGFrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NYYjlj0b; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676911076; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gszhrT5puBaVOQk0Wm8QmMJf6xgdk2n9U4VjdEq2OBU=; b=g0rWrrO0EZ/4uTuBKJNuc8KG/wPxoRh3y7PiLLpD+l//OGkAlOCnYxeWk3JIdakKan6nka 4uYHpPktXmuK6rIYFk/qSJtCDkLDC0H2KU18Sz5uzT2sKJxm0R/N7Z8bWYFEu4JutqxXq5 4lTec1RHXbWgevD7m2mFRjd9N8N9uLwfdp/6zbxlpN7vyDM0Hk//s7DL5mKlh6i1v6j3sf qEqkD8sOPAQTdPov/oZjDuzLRiPL/Vq86AT44vlLfN0w5+nNmMWpxLQQxBEq+Z4kl8kz3d FD+JG4huJ9Mi1x/k/0CwCdVsTAd7esHKXCbDnr9JM2o1E2jw5RftXwEs4aGhNw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU99w-0000uP-Ry; Mon, 20 Feb 2023 11:37:00 -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 1pU99v-0000u3-0c for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 11:36:59 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU99t-0005Gv-8n for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 11:36:58 -0500 Received: by mail-lf1-x129.google.com with SMTP id s20so2098019lfb.11 for ; Mon, 20 Feb 2023 08:36:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=gszhrT5puBaVOQk0Wm8QmMJf6xgdk2n9U4VjdEq2OBU=; b=NYYjlj0bOJDnfsXPQZRFtVpaPB2sy7d/n3ZMKrKgYHkNUBbBL2u/YWfWpuqtiKDIEM QR6+3hFxZ+g9hw1Hzetzso/sp+bMKawZT3gN8z8QOPvXW0LT5JQY2Ixp2ej+cqzCVhFu xc84WO402H3aimzjDaXd+RR3ncdIyenxy8dZpH6DXibMVmIhVgUomM18u+k3ICShnt0n XyFgH7XfNyi2xfnLS5xoyN5A0dr/fokRToXzFED1Z0psZzBaD8B2LDhpI2B3KA0hggDX 89QiwY6rmJxAw8oozNDBs32iUcMHtF2DA3/DXjbD04yxMYqoL0ibk/jnVyPafjbI7Yks 8TpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gszhrT5puBaVOQk0Wm8QmMJf6xgdk2n9U4VjdEq2OBU=; b=WiGNm2nWeCU4J9cjQa/mWpx9A3vREurAUsC0ZMLloyZB8TFXE3UfX6ZH3ExWdCeeZJ tRJNP8NzibW9N/59qgPq7XMpGvZhnnX3/WF1w14q4xDQomAq8SuzHo/i/NsyRTX+HWTi K+IyTRJjmUbplW6dnAy6qUolc0LknYmd+KBUXq0luvrxi79N86z6CJp17m/jemY5tocO sFNmTfnv6qb68jSmDuo5nUSwWBQaHV9iEznHjmB0frtAsVPe21h3FW9eSk31UX3axzKi tj7ebrObNpDNLl8nvTS93GYKe4G17h74sPz+TE6Qee9k3f3U78a5Jypfa08P1jRRvW8y osOA== X-Gm-Message-State: AO0yUKVYX3q1684RDnb2MfBvnrdfcer2CQ85wdbWTOug3XaaRSlvhJ81 j5ow4xrxCgzuND1FeHavPLTNbnGbqxk= X-Google-Smtp-Source: AK7set9dIKNXzy9KIEyP10xJqFJy3b2sZl1QowfA06md3tobWA3KtXYKj/1cl44r7JTSVG4AOLZWbw== X-Received: by 2002:ac2:5312:0:b0:4b5:5ddc:da32 with SMTP id c18-20020ac25312000000b004b55ddcda32mr581144lfh.56.1676911015138; Mon, 20 Feb 2023 08:36:55 -0800 (PST) Received: from [127.0.0.1] ([62.118.86.160]) by smtp.gmail.com with ESMTPSA id h20-20020a197014000000b004b50b4f63b7sm1565706lfc.170.2023.02.20.08.36.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2023 08:36:54 -0800 (PST) Date: Mon, 20 Feb 2023 23:36:50 +0700 From: Ilya Chernyshov To: Ihor Radchenko CC: emacs-orgmode Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_org-element-timestamp-interpreter=3A_?= =?US-ASCII?Q?Return_daterange_anyway=2C_if_DATERANGE_is_non-nil?= User-Agent: K-9 Mail for Android In-Reply-To: <87wn4cegt4.fsf@localhost> References: <87y1ot6dqz.fsf@gmail.com> <87wn4cegt4.fsf@localhost> Message-ID: <9E22693E-7D20-470A-B57B-EA17BBE9160F@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----KSDDR1M4LS2T0O1MRBE1UREBT8IEV6 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=ichernyshovvv@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: X-Migadu-Queue-Id: 8DDB48FFF X-Spam-Score: -7.66 X-Migadu-Spam-Score: -7.66 X-Migadu-Scanner: scn0.migadu.com 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-TUID: Dx+xL6J/SOPL ------KSDDR1M4LS2T0O1MRBE1UREBT8IEV6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable You suggest to split timestamp types active/inactive-range to active/inacti= ve-timerange, active/inactive-daterange? On February 20, 2023 6:07:19 PM GMT+07:00, Ihor Radchenko wrote: >Ilya Chernyshov writes: > >> So, an option is needed that controls whether to return a=20 >> daterange >> (even it's possible to return a timerange) or a timerange (if the=20 >> dates >> in the range are equal)=2E >> >> I wrote a patch that handles this problem, could you please review=20 >> 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=2E > >--=20 >Ihor Radchenko // yantar92, >Org mode contributor, >Learn more about Org mode at =2E >Support Org development at , >or support my work at ------KSDDR1M4LS2T0O1MRBE1UREBT8IEV6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable You suggest to split timestamp types active/inacti= ve-range to active/inactive-timerange, active/inactive-daterange?

On February 20, 2023 6:07:19 PM GMT+07:00, Iho= r Radchenko <yantar92@posteo=2Enet> wrote:
Ilya Chernyshov <ichernyshovvv@gmail=
=2Ecom> 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
d= ates
in the range are equal)=2E

I wrote a patch that handles th= is problem, could you please review
the
code and give some advice = to improve it?

What about recording the type of timesta= mp range in the parser?
Then, interpreter can simply examine the range t= ype and emit the correct
timestamp string=2E

<= /div> ------KSDDR1M4LS2T0O1MRBE1UREBT8IEV6--