From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers Date: Wed, 30 Mar 2016 09:12:19 -0700 (PDT) Message-ID: <332afe2d-845d-4222-b238-1ab4a154088d@default> References: <87fuv86obk.fsf@wanadoo.es> <87bn5w6kk9.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459354407 16505 80.91.229.3 (30 Mar 2016 16:13:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2016 16:13:27 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 23151@debbugs.gnu.org, Richard Stallman To: =?UTF-8?Q?=C3=93scar?= Fuentes , Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 30 18:13:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1alIk4-0003e8-7J for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Mar 2016 18:13:12 +0200 Original-Received: from localhost ([::1]:55642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alIk3-0005a8-H2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Mar 2016 12:13:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alIjy-0005Wa-9U for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2016 12:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alIju-0003sf-7V for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2016 12:13:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alIju-0003sb-4T for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2016 12:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1alIjt-0001Pr-Re for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2016 12:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Mar 2016 16:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23151 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23151-submit@debbugs.gnu.org id=B23151.14593543515406 (code B ref 23151); Wed, 30 Mar 2016 16:13:01 +0000 Original-Received: (at 23151) by debbugs.gnu.org; 30 Mar 2016 16:12:31 +0000 Original-Received: from localhost ([127.0.0.1]:45267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alIjP-0001P8-1K for submit@debbugs.gnu.org; Wed, 30 Mar 2016 12:12:31 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:28362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alIjN-0001Ov-CN for 23151@debbugs.gnu.org; Wed, 30 Mar 2016 12:12:29 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2UGCMje008403 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Mar 2016 16:12:23 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u2UGCMIh011374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Mar 2016 16:12:22 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u2UGCLKV004786; Wed, 30 Mar 2016 16:12:21 GMT In-Reply-To: <87bn5w6kk9.fsf@wanadoo.es> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115772 Archived-At: > >> a safe method of forcing Emacs to save the file without altering the > >> buffer's content. > > > > Two methods were already presented in this thread. >=20 > Someone mentioned C-u C-x C-w, which shows a prompt where you are > supposed to write the file name of the buffer you are visiting. If you > type the wrong file name, hopefully you will notice the mistake before > creating too much damage. I mentioned it. And no - just hit RET. End of story. You need not enter any file name. The file you are visiting is saved (rewritten), without any name change. There is really nothing error prone about this, AFAICS. > This is not a safe method. Seems safe enough to me. Have you encountered danger when using it? (Have you even tried to use it?) But you are welcome to define a command that does the same thing without any need to hit RET. And bind that to a key. Trivial to do. I see no special reason why we need to add such a command to Emacs, and a fortiori why we should need to bind such a command to a key by default, and super a fortiori why we should modify `C-x C-s' so that it does this. Let's please keep someone's clever idea of DWIM away from our good old stalwart `C-x C-s'. This all seems to be a tempest in a teapot. YAGNI, or if YNI then you can easily write it. > Other mentioned C-u M-~ (which actually should be C-u M-~ C-x C-s). > Apart from being a long finger-twisting sequence, M-~ is impossible to > type on some keyboards where ~ is written as AltGr-~, or difficult in > some input methods, where ~ is a dead key. >=20 > This is not convenient. Again, trivial to bind to any key you like. > The char&del C-x C-s method is popular because Emacs does > not offer something better out of the box. Again with the "popular" claim? 3 people said they use it, sometimes. Hardly a groundswell. And neither method mentioned is a difficult workaround, if you really want to force rewriting of the visited file. > It is about time that Emacs provides an intuitive (as per > Emacs standards), convenient and safe method for doing that task. "That task" - again hyperbole. Not much of a task, IMHO. So no, I disagree that it is "about time that Emacs provide" something to fill this great lack. Nothing wrong with adding a command, if others really feel it is lacking. But I don't see why we would bind it by default, and even less why we should mess with `C-x C-s' to handle this "need". Here's another thing to ponder: Of the 3 people who expressed a need for force-saving the current file, how many bothered to trivially define and bind a command to do that? None of them should have any problem doing that - they all Lisp well. None did it (AFAIK). Why not? Because it isn't needed. Even by them. If enough users define and bind such a key, we'll hear about it and we can then reconsider. Until then, WAGNI.