From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27986: 26.0.50; 'rename-file' can rename files without confirmation Date: Mon, 11 Sep 2017 20:09:48 +0300 Message-ID: <83efrdrwkj.fsf@gnu.org> References: <61980dde-3d68-7200-e7f4-98f62e410060@cs.ucla.edu> <1002ee73-0ab5-409b-831f-0c283c322264@cs.ucla.edu> <83o9rignt6.fsf@gnu.org> <83d17whl72.fsf@gnu.org> <8e6de468-600c-4f2d-a21a-c2ff3a63d065@cs.ucla.edu> <83zib0g221.fsf@gnu.org> <2bb4b7ee-6bf9-df3d-5cd8-ae7992b9f2e7@cs.ucla.edu> <83wp64fdc4.fsf@gnu.org> <83valnfv9u.fsf@gnu.org> <7f0c12f6-57eb-63b9-c296-e062cbf0710c@cs.ucla.edu> <83o9rffqfp.fsf@gnu.org> <83efsbfmij.fsf@gnu.org> <83efs8dp4b.fsf@gnu.org> <2ff8e814-b75d-1c9f-a096-8ad644c01ccc@cs.ucla.edu> <8360cpthq9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1505149887 28141 195.159.176.226 (11 Sep 2017 17:11:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2017 17:11:27 +0000 (UTC) Cc: rms@gnu.org, johnw@gnu.org, p.stephani2@gmail.com, michael.albinus@gmx.de, monnier@IRO.UMontreal.CA, 27986@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 19:11:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drSEo-0006V8-DT for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 19:11:10 +0200 Original-Received: from localhost ([::1]:59232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drSEv-00071Q-JA for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 13:11:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drSEm-0006yY-GD for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 13:11:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drSEg-0002z4-FC for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 13:11:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drSEg-0002z0-AK for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 13:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1drSEg-0000MN-5f for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2017 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 27986-submit@debbugs.gnu.org id=B27986.15051498251335 (code B ref 27986); Mon, 11 Sep 2017 17:11:02 +0000 Original-Received: (at 27986) by debbugs.gnu.org; 11 Sep 2017 17:10:25 +0000 Original-Received: from localhost ([127.0.0.1]:33895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drSE4-0000LR-Oj for submit@debbugs.gnu.org; Mon, 11 Sep 2017 13:10:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drSE3-0000LG-Gu for 27986@debbugs.gnu.org; Mon, 11 Sep 2017 13:10:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drSDs-0002eN-7M for 27986@debbugs.gnu.org; Mon, 11 Sep 2017 13:10:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drSDe-0002WH-0W; Mon, 11 Sep 2017 13:09:58 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4649 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1drSDW-0000rE-SZ; Mon, 11 Sep 2017 13:09:51 -0400 In-reply-to: (message from Paul Eggert on Mon, 11 Sep 2017 09:45:48 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136797 Archived-At: > Cc: monnier@IRO.UMontreal.CA, johnw@gnu.org, rms@gnu.org, > p.stephani2@gmail.com, 27986@debbugs.gnu.org, michael.albinus@gmx.de > From: Paul Eggert > Date: Mon, 11 Sep 2017 09:45:48 -0700 > > On 09/11/2017 07:47 AM, Eli Zaretskii wrote: > > 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. > > > 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. > > 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. I think there was a confusion here between interactive and non-interactive uses of rename-file. For interactive use, AFAIR we agreed that the behavior should stay as before, in particular to be consistent with e.g. invocation of 'mv' from the shell prompt. For non-interactive use, we agreed to change the behavior wrt directories, with a slight preference to signaling an error even if the target is an empty directory.