In spacemacs I find that two ways to get a new copy of a file with a slightly different filename both suffer from the same completion problem:
- C-x C-w (
write-file
) - dired-aux's
dired-do-rename
(bound toR
in spacemacs indired
)
Either way, if I type the initial part of the existing filename, hoping to get a completion, and then TAB
to complete, I get the completion to the existing file name that I was after. However, also, the rename operation is actually run immediately when I hit TAB
, which always fails with Cannot move to same file: /path/of/very_long_file_name_indeed.something.something
. What I want is to get just the completion, so that I can edit the new filename to say very_long_file_name_indeed_renamed.something.something
, without typing out the full original filename first.
I expect probably what I want here is to ask something (ivy? counsel? dired-aux? dired?) to only complete, not execute the rename.
How do I complete the filename so that I can edit it before emacs tries to rename the file?
emacs -Q
). For me,TAB
just completes - it doesn't also start renaming/moving the file. Do you see the same problem if you start Emacs withemacs -Q
(no init file)? If not, bisect your init file to find the culprit.