crux
crux copied to clipboard
More robust `crux-rename-file-and-buffer`.
Currently if you rename a new buffer that hasn't been saved yet, crux-rename-file-and-buffer
will only rename the buffer but not reset the visited file name, so saving after renaming will still save to the file name before renaming. The PR also let the user know if we are renaming to an existing buffer.
- Offer to save file first if modified or new unsaved buffer.
- Message user if new file name is the same.
Before submitting a PR make sure the following things have been done (and denote this by checking the relevant checkboxes):
- [x] The commits are consistent with our contribution guidelines
- [x] The new code is not generating bytecode or
M-x checkdoc
warnings - [x] You've updated the changelog (if adding/changing user-visible functionality)
- [ ] You've updated the readme (if adding/changing user-visible functionality)
Thanks!
@bbatsov how does this look?
The messages can be a bit clearer, but your proposal looks good to me overall.
Do you have a better message? What's unclear?
@bbatsov ping.