emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Ruffing <crypto@timruffing.de>
To: emacs-orgmode@gnu.org
Subject: [BUG] Date prompt suggests yesterday when changing timestamp with org-extend-today-until set [9.6]
Date: Fri, 20 Jan 2023 12:55:28 +0100	[thread overview]
Message-ID: <3489c1917ad4be0625ea5f0b2c1b0f2b72ea39e9.camel@timruffing.de> (raw)

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. 
 
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. 

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.) 

Best,
Tim


PS: Thanks for org-mode. It has my changed my life.



             reply	other threads:[~2023-01-21 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 11:55 Tim Ruffing [this message]
2023-01-22 11:44 ` [BUG] Date prompt suggests yesterday when changing timestamp with org-extend-today-until set [9.6] Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3489c1917ad4be0625ea5f0b2c1b0f2b72ea39e9.camel@timruffing.de \
    --to=crypto@timruffing.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).