[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23151: 25.1.50; Emacs should have a convenient command for saving un
From: |
Alan Mackenzie |
Subject: |
bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers |
Date: |
29 Mar 2016 19:14:40 -0000 |
User-agent: |
tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.2-RELEASE-p14 (amd64)) |
In article <mailman.8597.1459265831.843.bug-gnu-emacs@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).
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Lars Magne Ingebrigtsen, 2016/03/29
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Johan Bockgård, 2016/03/29
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Richard Stallman, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Óscar Fuentes, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Andreas Schwab, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Óscar Fuentes, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Andreas Schwab, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Óscar Fuentes, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Drew Adams, 2016/03/30
- bug#23151: 25.1.50; Emacs should have a convenient command for saving unchanged buffers, Drew Adams, 2016/03/30