GNU bug report logs - #23151
25.1.50; Emacs should have a convenient command for saving unchanged buffers

Previous Next

Package: emacs;

Reported by: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Date: Tue, 29 Mar 2016 15:37:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 25.1.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #13 received at 23151 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 23151 <at> debbugs.gnu.org
Subject: Re: bug#23151: 25.1.50;
 Emacs should have a convenient command for saving unchanged buffers
Date: 29 Mar 2016 19:14:40 -0000
In article <mailman.8597.1459265831.843.bug-gnu-emacs <at> gnu.org> 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’s,
>  unconditionally makes the previous version into a backup file.
> Prefixed with three C-u’s, 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 use
> 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


> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).





This bug report was last modified 8 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.