From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers Date: 29 Mar 2016 19:14:40 -0000 Organization: muc.de e.V. Message-ID: <20160329191440.5386.qmail@mail.muc.de> References: 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 1459278930 15183 80.91.229.3 (29 Mar 2016 19:15:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2016 19:15:30 +0000 (UTC) Cc: 23151@debbugs.gnu.org To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 21:15:15 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 1akz6e-0005sR-3L for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 21:15:12 +0200 Original-Received: from localhost ([::1]:49398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akz6d-0002Uw-78 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 15:15:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akz6Y-0002R3-LX for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 15:15:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akz6U-00073b-LO for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 15:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akz6U-00073V-Ib for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akz6U-0000By-7T for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 15:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Mar 2016 19:15:02 +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.1459278885699 (code B ref 23151); Tue, 29 Mar 2016 19:15:02 +0000 Original-Received: (at 23151) by debbugs.gnu.org; 29 Mar 2016 19:14:45 +0000 Original-Received: from localhost ([127.0.0.1]:44107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akz6C-0000BD-UC for submit@debbugs.gnu.org; Tue, 29 Mar 2016 15:14:45 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:20572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akz6A-0000Az-Oy for 23151@debbugs.gnu.org; Tue, 29 Mar 2016 15:14:43 -0400 Original-Received: (qmail 5387 invoked by uid 3782); 29 Mar 2016 19:14:40 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.2-RELEASE-p14 (amd64)) 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:115734 Archived-At: In article you wrote: > During an unrelated discussion on emacs-devel, it turns out that > virtually everybody is in the habit of making a change, then deleting > the change, just to make `C-x C-s' work. This means that there is a > need for Emacs to offer a command to save buffers, even if they aren't > changed. > (All the electricity in the Emacs modes means that even if you find > typing `SPC DEL C-x C-s' convenient, sometimes it makes Stuff Happens, > and that DEL doesn't really undo what you've done.) > Several options exist: > 1) Have the interactive `C-x C-s' command always save the buffer, no > matter whether it's unchanged or not. I think many people would object > to this, as they're used to just `C-x C-s'-ing idly while thinking of > other things. > 2) Have the prefix to that command save the unchanged buffer. This > would be the obvious choice, but: > -------------- > (save-buffer &optional ARG) > Save current buffer in visited file if modified. > Variations are described below. > By default, makes the previous version into a backup file > if previously requested or if this is the first save. > Prefixed with one C-u, marks this version > to become a backup when the next save is done. > Prefixed with two C-u=E2=80=99s, > unconditionally makes the previous version into a backup file. > Prefixed with three C-u=E2=80=99s, marks this version > to become a backup when the next save is done, > and unconditionally makes the previous version into a backup file. > -------------- > Eh. Four `C-u's? I don't think so. We could bind `C-x C-s' to a new > `save-buffer-command' that has different prefix rules. Does anybody us= e > the backup stuff? > 3) Add a new keystroke. > 4) Something else. User: C-x C-s Emacs: "Buffer unmodified: save anyway? (y or n): " User: y > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no --=20 Alan Mackenzie (Nuremberg, Germany).