In dired you can rename files just by editing the directory listing and then saving it.
Is it possible to use use an alternative method for renaming when using dired for renaming? I want to use "svn mv", "bzr mv" or "git mv" instead of just renaming, so that I can register the extra metadata in the source control system.
I don't think dired provides any hook for that. You may be stuck doing something like
Looking at the functions in
dired-aux.el
, it seems like the built-inrename-file
is what is ultimately called bydired-rename-file
(which is the function bound to 'R' indired-mode
).What you could do is grab that function and replace the call to
rename-file
with a call toshell-command
that runs the appropriate VCS command.However, another (better/easier) option would be to use one of Emacs's VCS modes to rename your files in your revision control system directly -- have a look at magit or PSVN or MercurialMode, depending on your choice of poison...