diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-03 19:24:40 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-03 19:24:40 -0500 |
| commit | 5b1aae68ee387f4024c5417e68b416f345e7267b (patch) | |
| tree | 93cae7339a185ea3176a21123415d1c15046b3c9 /tests/test-auth-config-toggle-auth-source-debug.el | |
| parent | ddb2c314f28e4a39cc1029841694d497333de80a (diff) | |
| download | dotemacs-5b1aae68ee387f4024c5417e68b416f345e7267b.tar.gz dotemacs-5b1aae68ee387f4024c5417e68b416f345e7267b.zip | |
fix: use file basename when moving buffer + file
`cj/--move-buffer-and-file` was building the destination as `(concat dir "/" (buffer-name))`. If the buffer had been renamed via `M-x rename-buffer`, or uniquified by Emacs with a `<2>` suffix when a second buffer visited the same filename, the move wrote a file with the wrong name on disk.
I derived the destination basename from `buffer-file-name` instead, in both the internal helper and the interactive wrapper. The wrapper's overwrite-prompt now also formats the real target filename rather than the buffer name.
I added two regression tests: one for a renamed buffer visiting `original.txt`, and one for a `<2>` uniquified buffer with a trailing-slash target directory.
Diffstat (limited to 'tests/test-auth-config-toggle-auth-source-debug.el')
0 files changed, 0 insertions, 0 deletions
