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>, Andreas Schwab <schwab <at> linux-m68k.org>, 70725 <at> debbugs.gnu.org
Subject: bug#70725: 29.3; dired-do-touch completion
Date: Tue, 07 May 2024 19:48:54 +0300
[Message part 1 (text/plain, inline)]
> However this doesn't explain why dired-do-touch uses a completing-read

Indeed, this was an oversight.  Here is the patch
that replaces 'completing-read' with 'read-string':

[dired-mark-read-string.patch (text/x-diff, inline)]
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index a2ce3083cfe..f3343b9b637 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -658,10 +658,13 @@ dired-mark-read-string
 
 Optional arg COLLECTION is a collection of possible completions,
 passed as the second arg to `completing-read'."
-  (dired-mark-pop-up nil op-symbol files
-		     'completing-read
-		     (format prompt (dired-mark-prompt arg files))
-		     collection nil nil initial nil default-value nil))
+  (apply #'dired-mark-pop-up
+         nil op-symbol files
+         (if (eq op-symbol 'touch) 'read-string 'completing-read)
+         (format prompt (dired-mark-prompt arg files))
+         (if (eq op-symbol 'touch)
+             `(,initial nil ,default-value nil)
+           `(,collection nil nil ,initial nil ,default-value nil))))
 
 
 ;;; Cleaning a directory: flagging some backups for deletion

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.