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


Message #25 received at 70725 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#70725: 29.3; dired-do-touch completion
Date: Sun, 05 May 2024 09:46:53 +0300
> I didn't check carefully and I see now that the prompt says "now" for
> DEFAULT but indeed the DEFAULT is the timestamp of the selected file and
> not `current-time`, so to reflect what the prompt says (now) we have to
> modify DEFAULT, maybe like this in `dired-do-chxxx`:
>
> @@ -437,4 +437,7 @@
> -			   (format-time-string
> -			    "%Y%m%d%H%M.%S"
> -			    (file-attribute-modification-time
> -			     (file-attributes default-file))))
> +			   (list
> +                            (format-time-string
> +			     "%Y%m%d%H%M.%S" (current-time))
> +                            (format-time-string
> +			     "%Y%m%d%H%M.%S"
> +			     (file-attribute-modification-time
> +			      (file-attributes default-file)))))

This breaks "now" that would not be "now" anymore because of
special-handling that uses "-t":

			      (unless (or (string-equal new-attribute "")
					  ;; Use `eq' instead of `equal'
					  ;; to detect empty input (bug#12399).
					  (eq new-attribute default))
				(if (eq op-symbol 'touch)
				    (list "-t" new-attribute)
				  (list new-attribute)))




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.