GNU bug report logs - #70725
29.3; dired-do-touch completion

Previous Next

Package: emacs;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Thu, 2 May 2024 19:53:01 UTC

Severity: normal

Found in version 29.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: christopher <at> librehacker.com, Eli Zaretskii <eliz <at> gnu.org>, 70725 <at> debbugs.gnu.org
Subject: bug#70725: 29.3; dired-do-touch completion
Date: Mon, 06 May 2024 09:50:17 +0300
> What I see and is wrong IMO is:
>
> - DEFAULT is the timestamp of the current file at point and prompt says
> that DEFAULT is "now".
>
> - Pressing RET should use DEFAULT, but IIUC what you say, it returns
> current-time timestamp, is it correct?
> If so this is another inconsistency, RET should always return DEFAULT with an
> empty prompt.

The prompt of dired-do-touch with the default value "now" is a special case.
This exception is required to solve the time paradox.  If the default value
was a fixed value of some moment of time such as you proposed

  (format-time-string "%Y%m%d%H%M.%S" (current-time))

then after you press RET the timestamp of the file will be set
to some moment of time in the past, because it takes time
between you press 'T' (dired-do-touch) and then press 'RET'
(exit-minibuffer).

So the timestamp of the file will be wrong, not the time
when you press 'RET'.  For example, I often use the moment
of pressing 'RET' to ensure that the time of pressing 'RET'
is the time that the file timestamp will be set to.




This bug report was last modified 1 year and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.