From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UEXrBugfqWQ5TAEASxT56A (envelope-from ) for ; Sat, 08 Jul 2023 10:35:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aHO5BugfqWQFmAAAauVa8A (envelope-from ) for ; Sat, 08 Jul 2023 10:35:52 +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 0822B5DDA6 for ; Sat, 8 Jul 2023 10:35:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fAeVkZo4; 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=1688805351; 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=av+zd749EhmI8q1HMAC+6gRkLSGQnmGJNAU4/pOHKjc=; b=fbM3oa1QNHNQycUgbIx4loawrvcVZD4hU02Z1u/Ebsxs/cedRRxQjTILwATn7zI6H0Qj2U MN6eYo+5mCzwh5Xm/ml+9dOKm60CGiJBtHpZsiR4DaISOCuuQtZ9Emj+cHoP8cMBqqkdK8 VyaxtHUC29qkCDLUGZHzIjy9LW0zXkBVvgJiWHAOdmc9w+rfb88DxH9LTW1dlgscqIer6R qvNSjxXkp0pVMU4g9pxwXApdXDDsN30uNKKhaoCnuQ82CHAz39MnWEge/cGHA0YHfp76/D m4OaA/4vxhs7hjwVpaDISgaHUP1KyrwoxAXThp/y7sa6t5shGn1A4peLDyQmrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fAeVkZo4; 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=1688805351; a=rsa-sha256; cv=none; b=HQkhqqBySRMB4skojtmbbpxqaTyHKH7R1VsKfoqOp/dyGgL+JqQBi+s4we4eOgc218691L 5l6NlWcpR2QmYE9f8QyHzEFWqOKNfuWyvxUBxJbSECr8ypbErgNhbCMqWqqOkqSzBBsEwp orkptP9R8VSrAMXALBgJeY0mlknmlYWsXVM1fvHRs888C1QUqObirmCWbxxVqgatxJ1ZPw dqeRGvRwLYDZ3dpliLyamPo7k4yLoW9SZ0MhYnhXP01Z/NMMXNvpns9FKswQlaV3U/d/vP Zwo+ySeOOF1x4QrIRhQjMio3eb9aF/YKhOnlet4TuZWKDGKN2fO8JPZzanJFBQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qI3PG-00083s-R1; Sat, 08 Jul 2023 04:35:06 -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 1qI3PE-000829-KQ for emacs-orgmode@gnu.org; Sat, 08 Jul 2023 04:35:04 -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 1qI3PC-0007xj-90 for emacs-orgmode@gnu.org; Sat, 08 Jul 2023 04:35:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 419BD240027 for ; Sat, 8 Jul 2023 10:35:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688805300; bh=IzEgLEhtbm1DYixJsr/ToXH2UwjAwXIHxpmVlBh+Y2A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=fAeVkZo4bSAs4u+Fy/9C/iEfhfIjPblFQOcgayQW1Fhd6xd0O1XA0XQjvVF8ApfH8 KcLUiPZD+QeyMELcvR7HD1rLLJgAKI6eHc0Vev0ECNnux9RzDsY1BSz4BTxaQD5vdM iUqcSSH+VgIERkpMe83NPBO7eQZpv+hPbd8RKAOk1E8GpJZm0R8Aeq3jz7Y+Kgqi3N nWw50g8gLPnN53/zmGDM6Zp5KvDq14+h0LSzQXjl8Cvakzm4AwUY1yU18vXsE0Gcv1 1a3aiwFWreXW3jzj1xMsNqw4XzZT/Zp8p0v51BICoPKqEn3T+suS2VTX+mgVfkBx4b MWb6UBAU15PLQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qyk8z3V27z6tmv; Sat, 8 Jul 2023 10:34:59 +0200 (CEST) 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: <87edlkyyit.fsf@gmail.com> References: <87y1ot6dqz.fsf@gmail.com> <87wn4cegt4.fsf@localhost> <9E22693E-7D20-470A-B57B-EA17BBE9160F@gmail.com> <87a616c5do.fsf@localhost> <87wmzi4s6n.fsf@localhost> <87edlkyyit.fsf@gmail.com> Date: Sat, 08 Jul 2023 08:35:02 +0000 Message-ID: <87ttueajih.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, T_SCC_BODY_TEXT_LINE=-0.01 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 X-Spam-Score: -7.74 X-Migadu-Queue-Id: 0822B5DDA6 X-Migadu-Spam-Score: -7.74 X-Migadu-Scanner: mx0.migadu.com X-TUID: 5ofowOVfYv0n Ilya Chernyshov writes: >> Interpreting timestamps with :time-range nil and >> :day-end/:year-end/:month-end non-nil as timerange is a breaking change. >> Let's avoid it. > > Timestamp objects (ranges) with :range-type nil are now interpreted as > dateranges, as it was before. I still have questions about this part. > + (hour-start (org-element-property :hour-start timestamp)) > + (minute-start (org-element-property :minute-start timestamp)) > + (hour-end (or (org-element-property :hour-end timestamp) hour-start)) > + (minute-end (or (org-element-property :minute-end timestamp) minute-start)) > + (day-end (or (org-element-property :day-end timestamp) day-start)) > + (month-end (or (org-element-property :month-end timestamp) month-start)) > + (year-end (or (org-element-property :year-end timestamp) year-start)) I note that *-end is never going to be nil when the corresponding *-start is non-nil. This will remove some original information about timestamp that can cause edge cases as I describe below. > + (time-range-p (and hour-start minute-start minute-end hour-end So, this (and ...), copied from the old version of the code looks suspicious. > + (or (/= hour-start hour-end) > + (/= minute-start minute-end)))) > + (date-range-p (or (and (eq range-type nil) time-range-p) What about [2023-11-12 12:00-13:00] represented as Elisp AST with :range-type nil? > + (and day-end month-end year-end > + (or > + (/= day-start day-end) > + (/= month-start month-end) > + (/= year-start year-end))))) [2023-11-12 12:00]--[2023-11-12 13:00]? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at