In the macOS Finder
, I can rename a file or directory by pressing RET
and the current value becomes the default for the new file name. This helps if I make a small change, such as adding a date at the beginning of the filename.
In Emacs with dired, I can rename with R
but I don't have the previous value as the default, so I auto-complete it. This becomes dangerous if I make a mistake in the auto-completion and overwrite another file.
Can Emacs dired rename files incrementally as in the Finder?
next-history-element
, so doesM-n
. – xuchunyang Feb 14 '20 at 13:58next-line-or-history-element
. Nevertheless, what I said is true. Just try(completing-read "Test: " '("first" "second" "third") nil nil nil nil '("DEF"))
. The argDEF
ofcompleting-read
is the list of default values. You get the default value(s) when you press ↓ right after running the command. – Tobias Feb 14 '20 at 14:05