From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25642: 26.0.50; Save unmodified buffers not visiting a file yet Date: Tue, 07 Feb 2017 18:13:05 +0200 Message-ID: <83shnq569a.fsf@gnu.org> References: <87mvdyt7o5.fsf@calancha-pc> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1486484060 18222 195.159.176.226 (7 Feb 2017 16:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2017 16:14:20 +0000 (UTC) Cc: 25642@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 17:14:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cb8PB-0004FB-86 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2017 17:14:09 +0100 Original-Received: from localhost ([::1]:55125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb8PG-00083t-Rz for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2017 11:14:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb8P5-00081t-SU for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 11:14:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cb8P4-0007kM-Nv for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 11:14:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cb8P4-0007k7-KF for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 11:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cb8P4-00032F-EM for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 11:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2017 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25642 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25642-submit@debbugs.gnu.org id=B25642.148648399711586 (code B ref 25642); Tue, 07 Feb 2017 16:14:02 +0000 Original-Received: (at 25642) by debbugs.gnu.org; 7 Feb 2017 16:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:59166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cb8OK-00030o-PX for submit@debbugs.gnu.org; Tue, 07 Feb 2017 11:13:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cb8OJ-00030a-CM for 25642@debbugs.gnu.org; Tue, 07 Feb 2017 11:13:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cb8OA-0006u1-94 for 25642@debbugs.gnu.org; Tue, 07 Feb 2017 11:13:10 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb8OA-0006tp-5g; Tue, 07 Feb 2017 11:13:06 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1789 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cb8O9-0004R3-Fc; Tue, 07 Feb 2017 11:13:05 -0500 In-reply-to: <87mvdyt7o5.fsf@calancha-pc> (message from Tino Calancha on Tue, 07 Feb 2017 23:08:42 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:129075 Archived-At: > From: Tino Calancha > 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 > 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.