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 #19 received at 70725 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: christopher <at> librehacker.com, 70725 <at> debbugs.gnu.org
Subject: Re: bug#70725: 29.3; dired-do-touch completion
Date: Sat, 04 May 2024 14:43:44 +0300
> From: Thierry Volpiatto <thievol <at> posteo.net>
> Cc: christopher <at> librehacker.com,  70725-done <at> debbugs.gnu.org
> Date: Fri, 03 May 2024 07:10:37 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Cc: 70725 <at> debbugs.gnu.org
> >> From: Thierry Volpiatto <thievol <at> posteo.net>
> >> Date: Fri, 03 May 2024 04:55:41 +0000
> >> 
> >> Christopher Howard <christopher <at> librehacker.com> writes:
> >> 
> >> > 1. install helm
> >> > 2. emacs -q
> >> > 3. M-x helm-mode
> >> > 4. M-x dired (to some directory with files)
> >> > 5. M-x dired-do-touch (T)
> >> >
> >> > My problem is that, when I try to use this command in helm mode, helm
> >> > only gives me one completion option - the timestamp already on the
> >> > file. Helm tells me it is responding to a completing-read call. But
> >> > the dired-do-touch prompt says that the default action should be
> >> > "now", i.e., the current date and time. Maybe this is a helm issue,
> >> > but I was wondering if maybe something needs to be tweaked in
> >> > dired-do-touch so that it passes a correct completion list off to
> >> > completing-read.
> >> 
> >> "now" is not a valid answer for touch, it is just here in prompt to tell
> >> you what DEFAULT is, so what you see in Helm completion is what you have
> >> with vanilla Emacs if you press M-n. There is no issue here.
> >> That said you have better time using helm-find-files instead of dired
> >> for such operations on files.
> >
> > Thanks, Thierry.  I'm therefore closing this bug.
> 
> Hello Eli,
> 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)))))

Thanks, but can any of you two please show a recipe I could use to
look into this, without having to install Helm?  Because the
underlying issue is not Helm-specific, is it?




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.