Is there a way to rename an open file in Emacs? While I\'m viewing it? Something like save-as, but the original one should go away.
There is a way very easy, you press the command M-x and than type vc-rename-file, after that you just need to select your current file at the directory, and than choose the new name. The buff that has the changed file will be refreshed.
Source:https://www.gnu.org/software/emacs/manual/html_node/emacs/VC-Delete_002fRename.html