From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Rename, delete and move current buffer and file Date: Thu, 10 May 2018 19:04:42 +0300 Message-ID: <834ljfpkdh.fsf@gnu.org> References: <20180510082005.6pfpostuxcuzfutt@isis.luna> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1525968160 29460 195.159.176.226 (10 May 2018 16:02:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 16:02:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Amit Ramon Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 10 18:02:36 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fGo1b-0007Z2-Qq for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 18:02:35 +0200 Original-Received: from localhost ([::1]:34619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGo3i-0005lf-Hl for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 12:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGo3W-0005jU-FL for emacs-devel@gnu.org; Thu, 10 May 2018 12:04:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGo3S-0005lQ-AP for emacs-devel@gnu.org; Thu, 10 May 2018 12:04:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGo3S-0005lM-7P; Thu, 10 May 2018 12:04:30 -0400 Original-Received: from [176.228.60.248] (port=4189 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fGo3R-0001ha-Mm; Thu, 10 May 2018 12:04:30 -0400 In-reply-to: <20180510082005.6pfpostuxcuzfutt@isis.luna> (message from Amit Ramon on Thu, 10 May 2018 11:20:05 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225204 Archived-At: > Date: Thu, 10 May 2018 11:20:05 +0300 > From: Amit Ramon > > Stefan Monnier [2018-05-09 08:28 -0400]: > > >> I do not understand what you have in mind with write-file. This creates a > >> copy, which is natural given the name. Do you envision some changes to it? > > > >Not sure what happened, but my first answer said: > > > > so maybe we could instead have `C-x C-w` prompt the user > > "delete the old file (y or n)?" > > For me the use case for using C-x C-w is not to move a file, but to > create a copy of a file leaving the original file untouched -- for > example if I want to create a new file but I want to start from an > existing one as a template. Let me remind people that "C-x C-w" is the Emacs implementation of the "Save As" paradigm, so it must stay as it is today. It would be possible to make it do something slightly different given an argument, but it already accepts an argument and interprets it in a different way. Maybe we could do the renaming with some special value of the argument, though. But the default behavior should definitely stay, IMO.