From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ICPxG2pZzGP5EAEAbAwnHQ (envelope-from ) for ; Sat, 21 Jan 2023 22:30:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mF3qGmpZzGMWKgEAG6o9tA (envelope-from ) for ; Sat, 21 Jan 2023 22:30:18 +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 04EDC1C682 for ; Sat, 21 Jan 2023 22:30:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJLQ7-0003jE-QA; Sat, 21 Jan 2023 16:29:04 -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 1pIpzq-0005mo-UU for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 06:55:50 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pIpzo-0001i7-W4 for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 06:55:50 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4NyycL1cp6z9sn8 for ; Fri, 20 Jan 2023 12:55:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timruffing.de; s=MBO0001; t=1674215730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZkwHKtiLz1/JxWbhitr3FxKDFiWe3nV4eoV9rZUCWk=; b=oOk3oXI8rftxmAyGDWrJnPZcFn+HeHBe88D9rBAnMl84zlR+CNdbLflCzm5eddTd6WAdCs 0o5IzEhdl8t+FcAGhYVIh0/ZuwjrGCOCB5xgM+70nW6Jmkz9I1hY1pE5+L1Bjq5NdvZMMg dOZxJTe6wp4OoMy3XUPB2Vvx+B+3ZjaEkoRlQ2v9rOfgDFMhajJGdvpaiVbDYCEdRNc1iv NEIpNq+cGwqw1Jps92arNDAe0QInmJgnSvvFjVyHIvFZocCH67STvJ4SJ9w4a+KZ1eHMJQ KC9j8saHbbGo1VPviOfUSt4xW8a4T28JMxOA7aJDcvyVss0/0TOLiPr+j2nA8A== Message-ID: <3489c1917ad4be0625ea5f0b2c1b0f2b72ea39e9.camel@timruffing.de> Subject: [BUG] Date prompt suggests yesterday when changing timestamp with org-extend-today-until set [9.6] From: Tim Ruffing To: emacs-orgmode@gnu.org Date: Fri, 20 Jan 2023 12:55:28 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: 4NyycL1cp6z9sn8 Received-SPF: pass client-ip=80.241.56.171; envelope-from=crypto@timruffing.de; helo=mout-p-201.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 21 Jan 2023 16:29:01 -0500 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674336618; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=uZkwHKtiLz1/JxWbhitr3FxKDFiWe3nV4eoV9rZUCWk=; b=GlQIEcVOEKSE7zPfrK05/h9JZeOzNgEQ7EHuryvk4jvVADnbudwwqryFjQXhZpO1cL4GB4 9hVoSbitKNwjStFzn6YIe01DXgl2JF3mQ5FWyhfyDFqL8Mx1JG/tlWoQ1SDKKpGQpdDGcF Tli/65btUz+wRLzFBNzNOEBsI+ZeMUy+1Xlja4As79xOrVDS3ublfV2xXzmN4tGvCi7mNU oacP01OuY4UgEVL/+FgfjDOeUWbrFC+mjVZwZjddH74h49+l3xLkWDT2X1MD/puiAxTCz8 sEpqgbFHkfjYXto5tz4xTPUTFS247JUqAh+rkcjgzt3OCaakC1XCY0P1whCdPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=timruffing.de header.s=MBO0001 header.b=oOk3oXI8; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674336618; a=rsa-sha256; cv=none; b=PUFyqTTA/7Gtp3TyetnUxCZzL95eNekKSv9dYXSZmW0ihtvVJ5PCR0T2GYymCZy43gMafq LtDG+zYbXEvf3oNnk1bcRkyzoFsPEaJANMso2i/9fLiOkPx15zKm6zlaCvTJyT3mgGBKmC BFuJJO/IiIfFQvFe1sIuLSd/yAHS1ad8x8W8qo/uEuK5kttaUQmd+R0Eu67TgZR2PaSOct 6LT1rtQzgkxBzELa74XFKn8hpF0v6VGqynvdeaf4tY1pynmLOGPTpal/dV71hsechTokJB kNuHh5iaoflxXC6jV1J11hhJAiUQUe4u5JT+gFFX3tXEe2J9M13/aUpRsTla9w== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.30 X-Spam-Score: -1.30 X-Migadu-Queue-Id: 04EDC1C682 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=timruffing.de header.s=MBO0001 header.b=oOk3oXI8; dmarc=none; 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" X-TUID: OKMRwbmOU39c Hi, Assume org-extend-today-until is set to an integer greater 0, say 3. When I change a timestamp without date such as <2023-01-20> (e.g, when rescheduling), the prompt defaults to a day earlier, i.e., to "2023-01- 19" in this case. The same happens with <2023-01-20 01:00> which is still before 3am.=C2=A0 =20 That's very confusing, in particular in the case when the old timestamp only has a date but no time. But even when the old timestamp has has a time, org should never suggest yesterday. I think a good rule of thumb here is that if the user just presses Enter without having typed anything at the prompt, the timestamp shouldn't change at all. The bug happens because org-read-date tries to take into account the value of org-extend-today-until but it should probably do this when the default time suggested to the user is taken from the current wallclock time, not when it's taken from an existing timestamp.=20 A similar issue when capturing has been reported and fixed here: https://lists.gnu.org/archive/html/emacs-orgmode/2019-06/msg00056.html (Please include me in CC for now, I haven't subscribed to mailing list.)=20 Best, Tim PS: Thanks for org-mode. It has my changed my life.