From: Lars Ingebrigtsen Date: Fri, 26 Jul 2019 09:12:03 +0000 (+0200) Subject: Tweak prompt when symlinking in dired X-Git-Tag: emacs-27.0.90~1817^2~110 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=048bdc2740fbd8eb1378437d909d44db89c48ec1;p=emacs.git Tweak prompt when symlinking in dired * lisp/dired-aux.el (dired-do-create-files): Fix prompt when sym/hardlinking (bug#26870). --- 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