[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70725: 29.3; dired-do-touch completion
From: |
Eli Zaretskii |
Subject: |
bug#70725: 29.3; dired-do-touch completion |
Date: |
Sat, 04 May 2024 14:43:44 +0300 |
> From: Thierry Volpiatto <thievol@posteo.net>
> Cc: christopher@librehacker.com, 70725-done@debbugs.gnu.org
> Date: Fri, 03 May 2024 07:10:37 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Cc: 70725@debbugs.gnu.org
> >> From: Thierry Volpiatto <thievol@posteo.net>
> >> Date: Fri, 03 May 2024 04:55:41 +0000
> >>
> >> Christopher Howard <christopher@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?
- bug#70725: 29.3; dired-do-touch completion, Christopher Howard, 2024/05/02
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/03
- bug#70725: 29.3; dired-do-touch completion, Eli Zaretskii, 2024/05/03
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/05
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Andreas Schwab, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/07
- bug#70725: 29.3; dired-do-touch completion, Eli Zaretskii, 2024/05/18
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/18