GNU bug report logs - #25642
26.0.50; Save unmodified buffers not visiting a file yet

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Tue, 7 Feb 2017 14:10:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 26.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 25642 <at> debbugs.gnu.org
Subject: bug#25642: 26.0.50; Save unmodified buffers not visiting a file yet
Date: Tue, 07 Feb 2017 18:13:05 +0200
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Tue, 07 Feb 2017 23:08:42 +0900
> 
> emacs -Q
> C-x b foo
> foo ; Insert something.
> M-: (set-buffer-modified-p nil) RET
> C-x C-s ; No file is written.
> 
> It's easy to change that flag for several buffers
> with `Buffer-menu-not-modified' or
> `ibuffer-do-toggle-modified'.  Then, if you plan to save those
> buffers and if they have buffer-file-name nil, then you
> are not offered to save them.
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >From 2e0d336c4889fac79e5621be34e9149eb3064cce Mon Sep 17 00:00:00 2001
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Tue, 7 Feb 2017 22:53:35 +0900
> Subject: [PATCH] Save unmodified buffers not visiting a file yet
> 
> * lisp/files.el (save-buffer): Set modified flag non-nil before
> 'basic-save-buffer' call (Bug#25642).

Please don't, at least not unconditionally.  I use this feature all
the time, e.g. when composing email messages.

I don't actually understand why this would be a problem: the user
explicitly wanted to reset the modified status of a buffer, why should
Emacs second-guess what the user meant?  But if there are some use
cases where you find this annoying (please describe them), let's make
this an optional behavior, off by default.

Thanks.




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

Previous Next


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