Subject: Re: bug#61718: [PATCH] Fill minibuffer when dired renaming one file

From: Daniel Martín <[email-masked]>
Date: Thu, 23 Feb 2023 00:26:47 +0100

Sandra Snan <[email-masked]> writes:

> When renaming a file in dired it's sometimes annoying to have to
> retype the entire name even when we're only changing a single
> character. With this tiny li'l one word patch, the minibuffer gets
> pre-filled by the old name.
> ---
>  lisp/dired-aux.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
> index 6cb097f6bb3..908e43af091 100644
> --- a/lisp/dired-aux.el
> +++ b/lisp/dired-aux.el
> @@ -2570,7 +2570,7 @@ Optional arg HOW-TO determines how to treat the target.
>    (dired-mark-pop-up
>     nil op-symbol files
>     #'read-file-name
> -   (format prompt (dired-mark-prompt arg files)) dir default))
> +   (format prompt (dired-mark-prompt arg files)) dir default nil default))
>  
>  (defun dired-dwim-target-directories ()
>    (if (functionp dired-dwim-target)

The name of the file you want to rename can be retrieved by typing M-n
in the minibuffer.