From b1d14b804edb1bc731ec29b2d054411c12c557b9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 21 May 2024 09:20:01 +0300 Subject: [PATCH] Use read-string instead of completing-read for dired-do-touch * lisp/dired-aux.el (dired-mark-read-string): Use read-string when op-symbol is 'touch' (bug#70725). (cherry picked from commit d00eb1c90253d2a353d3e9730df37fdd81c2a3d2) --- lisp/dired-aux.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 98a8f358199..d5f2876c3ee 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -647,10 +647,13 @@ values, passed as the seventh arg to `completing-read'. 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 -- 2.39.5