From 048bdc2740fbd8eb1378437d909d44db89c48ec1 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 26 Jul 2019 11:12:03 +0200 Subject: [PATCH] Tweak prompt when symlinking in dired * lisp/dired-aux.el (dired-do-create-files): Fix prompt when sym/hardlinking (bug#26870). --- lisp/dired-aux.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 09850198ca5..30a941c7bb6 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1898,7 +1898,14 @@ Optional arg HOW-TO determines how to treat the target. (set (make-local-variable 'minibuffer-default-add-function) nil) (setq minibuffer-default defaults)) (dired-mark-read-file-name - (concat (if dired-one-file op1 operation) " %s to: ") + (format "%s %%s %s: " + (if dired-one-file op1 operation) + (if (memq op-symbol '(symlink hardlink)) + ;; Linking operations create links + ;; from the prompted file name; the + ;; other operations copy (etc) to the + ;; prompted file name. + "from" "to")) target-dir op-symbol arg rfn-list default)))) (into-dir (progn -- 2.39.2