From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QMykDXHi2GTQygAASxT56A (envelope-from ) for ; Sun, 13 Aug 2023 16:02:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qPVADXHi2GSZTwAAauVa8A (envelope-from ) for ; Sun, 13 Aug 2023 16:02:25 +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 8C9833E0F9 for ; Sun, 13 Aug 2023 16:02:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=valentin-herrmann.de header.s=2022 header.b=jB8gB0J2; 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=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691935345; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=/CCRDGXEfp0aOd5HCvqHNNZcaHQeQE9LQKch9UqAlVc=; b=kTSHN40Mmj99fRKMAjyvUmTjCSR3XlEXZ5sWlgjtAgM/hg3Wt4YGXVib/qhRenu5D5wJXw rVuTMYW84cqhSn4LN8DuA1QaHtqsOj3ClL3VyUILiaTfnz8nxj50Pa4BJ05HWUYiGWy9jd jOEdKaIqi4sGIYJk76JmTHI5u93+hID7spSWnkHXp7shONPCy0WP0RdEpKXdrSoQl50q3K 8pPQNE8zkODP38d3TPPriZ32soglav+c24jisM9hN417LSqRMeyWX6W7u2cs8QDsknJpbi KoiiPniKh1nh2ENFLc1LqrtqvnQHPHrQyrGik0I3Rp/j1H4TIQTDNmwDUIqndQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=valentin-herrmann.de header.s=2022 header.b=jB8gB0J2; 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=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691935345; a=rsa-sha256; cv=none; b=OSiGCsme71u3Oqi/MOBA16rxJeKmVuMfRZr+rj6thLD+ZxVv9nudsyAzqVrNXlBclREyx2 ZRhEpBOfzhI//z3K2lNmLLrNyRgKhtIKts55h0qEOVqYnLCOJ1J7sN8s6HQQnoiQAcpkeZ 8lffixPz4h7iN+AkP5SY6xfHfNML4x/e8ERL7ZfcQ73s/2kLV4IVrcQnnHLeOCgiYsF3Ap Ahn2t/PjOjmCknwAsxwvxEKYCdOoJtPatEM4D8UyH+ji5psV/LMIslgtv9ULObsEFySFO5 yW6qsFLq6x5nltHXZdRoXcz5mGMnMecN4dPeJ80FtOdndda4Ncom29FgaQ1ybw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVBf1-0005Sj-C7; Sun, 13 Aug 2023 10:01:39 -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 1qVBew-0005RS-OY for emacs-orgmode@gnu.org; Sun, 13 Aug 2023 10:01:36 -0400 Received: from mx00.shmerver.de ([88.99.4.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVBes-0006qE-MC for emacs-orgmode@gnu.org; Sun, 13 Aug 2023 10:01:32 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 14F802A0073 for ; Sun, 13 Aug 2023 16:01:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valentin-herrmann.de; s=2022; t=1691935285; h=from:subject:date:message-id:to:mime-version:content-type: content-language:in-reply-to:references; bh=/CCRDGXEfp0aOd5HCvqHNNZcaHQeQE9LQKch9UqAlVc=; b=jB8gB0J2SKy6Rc7dwXA9cHNGQiFh/i4/+FkZ3AcfUjkaFav/I3/hMyh1Lu0FMXggQssGQb 69snn1pqyjKZLSSjhpxJ7ftvzjfCebGp9UB2A8jS0OEfWTUi3nf1VMwVj4jqxmjgudxcpy AnMjb/T8ZhI265bbZ/A6Qy2LXXPmoNJkVEAhnqRINjBttTlZ1tiiDbHSdrN1JnV7wip94V AA1PiIbdQkapfmWI+d7SahLxf2OBwTKYLHiIWxl64NQ4HR3ksGGnvGzgYaUzBDXDLE7ea/ LcMeKKhhWOhC7IpnVnecTM08Vw3JMMPQASmOffMXRt2/oCwRFzW6hc80zz5ggw== Content-Type: multipart/mixed; boundary="------------gRrUICpDXqKU2ZIf0J22mpDN" Message-ID: Date: Sun, 13 Aug 2023 16:01:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++ Content-Language: en-US To: "Valentin Herrmann via General discussions about Org-mode." References: <20230813091806.1435284-1-me@valentin-herrmann.de> <87il9jf7yw.fsf@localhost> <87fs4nf6wv.fsf@localhost> In-Reply-To: <87fs4nf6wv.fsf@localhost> X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=88.99.4.159; envelope-from=me@valentin-herrmann.de; helo=mx00.shmerver.de X-Spam_score_int: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.1 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, NICE_REPLY_A=-4.359, 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: , Reply-to: "Valentin G. J. Herrmann" From: "Valentin G. J. Herrmann" via "General discussions about Org-mode." 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-Queue-Id: 8C9833E0F9 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -6.59 X-Migadu-Spam-Score: -6.59 X-TUID: 9XUXjKYwlMtH This is a multi-part message in MIME format. --------------gRrUICpDXqKU2ZIf0J22mpDN Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit In the attachments is a better version with tests that also addresses your latest critique. On 13/08/2023 14.44, Ihor Radchenko wrote: > Ihor Radchenko writes: > >>> (while (or (= nshift 0) >>> - (not (time-less-p nil time))) >>> + (not (time-less-p nil (time-add time-to-extend time)))) >> >> And this compares "now" with year 1970. Will always return nil. > > Hmm. I somehow missed `time-add'. > However, this is still fishy. > What if we have something like <2023-08-13 2:00 ++8h>? > `org-extend-today-until' should probably be ignored then. --------------gRrUICpDXqKU2ZIf0J22mpDN Content-Type: text/x-patch; charset=UTF-8; name="0001-org.el-Respect-org-extend-today-until-in-timestamps-.patch" Content-Disposition: attachment; filename*0="0001-org.el-Respect-org-extend-today-until-in-timestamps-.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSAzMTdhYjNmMTMyODI1YWY5ZTVjYWFmMGRjMTgxMmRmNTQ1ZjBhZDVmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBWYWxlbnRpbiBIZXJybWFubiA8bWVAdmFsZW50aW4t aGVycm1hbm4uZGU+CkRhdGU6IFN1biwgMTMgQXVnIDIwMjMgMDk6NDg6NDIgKzAyMDAKU3Vi amVjdDogW1BBVENIXSBvcmcuZWw6IFJlc3BlY3Qgb3JnLWV4dGVuZC10b2RheS11bnRpbCBp biB0aW1lc3RhbXBzIHdpdGggKysKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0 ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhi aXQKCiogb3JnLmVsIChvcmctYXV0by1yZXBlYXQtbWF5YmUpOiBDaGFuZ2VkIG9yZy1hdXRv LXJlcGVhdC1tYXliZSwgc28gdGhhdApzd2l0Y2hpbmcgYSByZXBlYXRpbmcgdG9kbyB3aXRo IGEgdGltZXN0YW1wIG9mIHRoZSBmb3JtIDzigKYgKyvigKY+IHJlc3BlY3RzCmBvcmctZXh0 ZW5kLXRvZGF5LXVudGlsJy4KLS0tCiBsaXNwL29yZy5lbCAgICAgICAgICAgICAgfCAxMCAr KysrKysrLS0tCiB0ZXN0aW5nL2xpc3AvdGVzdC1vcmcuZWwgfCAzMyArKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKysKIDIgZmlsZXMgY2hhbmdlZCwgNDAgaW5zZXJ0aW9ucygr KSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL29yZy5lbCBiL2xpc3Avb3Jn LmVsCmluZGV4IGMwMzdiM2VlMC4uOWM5OGQ3NTM4IDEwMDY0NAotLS0gYS9saXNwL29yZy5l bAorKysgYi9saXNwL29yZy5lbApAQCAtMTAxMTEsOSArMTAxMTEsMTMgQEAgZW5vdWdoIHRv IHNoaWZ0IGRhdGUgcGFzdCB0b2RheS4gIENvbnRpbnVlPyAiCiAJCQkgIChvcmctdGltZXN0 YW1wLWNoYW5nZSBuIChjZHIgKGFzc29jIHdoYXQgd2hhdGEpKSkKIAkJCSAgKG9yZy1pbi1y ZWdleHAgb3JnLXRzLXJlZ2V4cDMpCiAJCQkgIChzZXRxIHRzIChtYXRjaC1zdHJpbmcgMSkp Ci0JCQkgIChzZXRxIHRpbWUKLQkJCQkoc2F2ZS1tYXRjaC1kYXRhCi0JCQkJICAob3JnLXRp bWUtc3RyaW5nLXRvLXRpbWUgdHMpKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAo c2V0cSB0aW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzYXZlLW1hdGNo LWRhdGEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3JnLXRpbWUtc3Ry aW5nLXRvLXRpbWUgdHMpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHVubGVzcyAo ZXF1YWwgd2hhdCAiaCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldHEgdGlt ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aW1lLWFkZCB0aW1lCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZWNvbmRzLXRv LXRpbWUgKCogMzYwMCBvcmctZXh0ZW5kLXRvZGF5LXVudGlsKSkpKSkpKQogCQkgICAgICAo b3JnLXRpbWVzdGFtcC1jaGFuZ2UgKC0gbikgKGNkciAoYXNzb2Mgd2hhdCB3aGF0YSkpKQog CQkgICAgICA7OyBSZW1hdGNoLCBzbyB0aGF0IHdlIGhhdmUgZXZlcnl0aGluZyBpbiBwbGFj ZQogCQkgICAgICA7OyBmb3IgdGhlIHJlYWwgc2hpZnQuCmRpZmYgLS1naXQgYS90ZXN0aW5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cmctdG9kbyAiRE9ORSIpCisJICAoYnVmZmVyLXN0cmluZykpKSkpKQorICAoc2hvdWxkCisg ICAoc3RyaW5nLW1hdGNoLXAKKyAgICAiMjAxNC0wMy0wNCAuKiAxODowMCIKKyAgICAobGV0 ICgob3JnLWV4dGVuZC10b2RheS11bnRpbCA0KSkKKyAgICAgIChvcmctdGVzdC1hdC10aW1l ICI8MjAxNC0wMy0wNCAwMjozNT4iCisgICAgICAgIChvcmctdGVzdC13aXRoLXRlbXAtdGV4 dCAiKiBUT0RPIEhcbjwyMDE0LTAzLTAzIDE4OjAwIC4rMWQ+IgorCSAgKG9yZy10b2RvICJE T05FIikKKwkgIChidWZmZXItc3RyaW5nKSkpKSkpCisgIChzaG91bGQKKyAgIChzdHJpbmct bWF0Y2gtcAorICAgICIyMDE0LTAzLTA0IC4qIDEwOjM1IgorICAgIChsZXQgKChvcmctZXh0 ZW5kLXRvZGF5LXVudGlsIDQpKQorICAgICAgKG9yZy10ZXN0LWF0LXRpbWUgIjwyMDE0LTAz LTA0IDAyOjM1PiIKKyAgICAgICAgKG9yZy10ZXN0LXdpdGgtdGVtcC10ZXh0ICIqIFRPRE8g SFxuPDIwMTQtMDMtMDMgMTg6MDAgLis4aD4iCisJICAob3JnLXRvZG8gIkRPTkUiKQorCSAg KGJ1ZmZlci1zdHJpbmcpKSkpKSkKICAgOzsgRG8gbm90IHJlcGVhdCBpbmFjdGl2ZSB0aW1l IHN0YW1wcyB3aXRoIGEgcmVwZWF0ZXIuCiAgIChzaG91bGQtbm90CiAgICAoc3RyaW5nLW1h dGNoLXAKLS0gCjIuNDAuMQoK --------------gRrUICpDXqKU2ZIf0J22mpDN--