unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: christopher@librehacker.com, 70725-done@debbugs.gnu.org
Subject: bug#70725: 29.3; dired-do-touch completion
Date: Fri, 03 May 2024 07:10:37 +0000	[thread overview]
Message-ID: <87fruzwetu.fsf@posteo.net> (raw)
In-Reply-To: <86fruzjudh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 May 2024 09:13:14 +0300")

[-- Attachment #1: Type: text/plain, Size: 2041 bytes --]

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


-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2024-05-03  7:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 19:51 bug#70725: 29.3; dired-do-touch completion Christopher Howard
2024-05-03  4:55 ` Thierry Volpiatto
2024-05-03  6:13   ` Eli Zaretskii
2024-05-03  7:10     ` Thierry Volpiatto [this message]
2024-05-04 11:43       ` Eli Zaretskii
2024-05-04 12:31         ` Thierry Volpiatto
2024-05-05  6:46       ` Juri Linkov
2024-05-06  5:40         ` Thierry Volpiatto
2024-05-06  6:50           ` Juri Linkov
2024-05-06 10:18             ` Thierry Volpiatto
2024-05-06 11:35               ` Andreas Schwab
2024-05-06 12:25                 ` Thierry Volpiatto
2024-05-07 16:48                   ` Juri Linkov
2024-05-18  8:43                     ` Eli Zaretskii
2024-05-18 15:46                       ` Thierry Volpiatto
2024-05-21  6:20                         ` Juri Linkov
2024-05-21 13:04                           ` Thierry Volpiatto
2024-05-21 14:33                             ` Thierry Volpiatto
2024-05-21 17:22                               ` Juri Linkov
2024-05-21 20:11                                 ` Thierry Volpiatto
2024-05-22  4:31                                   ` Thierry Volpiatto
2024-05-22  6:06                                     ` Juri Linkov
2024-05-22 17:10                                       ` Thierry Volpiatto
2024-05-23 15:42                                         ` Thierry Volpiatto
2024-05-21 16:16                             ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87fruzwetu.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=70725-done@debbugs.gnu.org \
    --cc=christopher@librehacker.com \
    --cc=eliz@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.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).