|
From: | Paul Eggert |
Subject: | bug#27986: 26.0.50; 'rename-file' can rename files without confirmation |
Date: | Mon, 11 Sep 2017 09:45:48 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/11/2017 07:47 AM, Eli Zaretskii wrote:
That wasn't my understanding. In our last email exchange about interactivity I proposed that Emacs prompt the user when the destination is not a directory name but happens to be a directory (see Bug#27986#97), but you were dubious about that (Bug#27986#100) so I left it alone.do these changes modify interactive behavior in incompatible ways? I thought we agreed to leave the interactive behavior intact, and only change the non-interactive uses.
I normally use dired to rename files in Emacs, and dired's behavior hasn't changed as far as I can tell. Where there is a bit of a change is when using M-x rename-file directly. Here, in the typical case with file name completion there is still no difference, since names of destination directories are completed to have trailing /. However, if one uses "M-x rename-file foo RET and then laboriously types out the name of an existing directory /tmp/destination-dir without using completion and without trailing / before hitting RET, one will notice a difference: rename-file will now say "File /tmp/destination-dir already exists; rename to it anyway? (yes or no)" and if one types "yes" the rename will typically fail. So yes, this is a (noisy) incompatibility with previous usage. If you like I can go back and implement the suggestion in Bug#27986#97; this would be more-compatible with existing usage. I suggest leaving it alone, though, as things are simpler and easier to explain the way they are.
[Prev in Thread] | Current Thread | [Next in Thread] |