From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Creating an empty file Date: Tue, 23 Jan 2007 17:48:54 +0100 Message-ID: <861wllheo9.fsf@lola.quinscape.zz> References: <86bqkphiyj.fsf@lola.quinscape.zz> <87odopr8ga.fsf@lrde.org> <87veixu2ep.fsf@vh213602.truman.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1169570961 6843 80.91.229.12 (23 Jan 2007 16:49:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2007 16:49:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 23 17:49:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H9Opc-0006aU-VY for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 17:49:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Opc-00036h-GL for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 11:49:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9OpR-00035j-KD for emacs-devel@gnu.org; Tue, 23 Jan 2007 11:49:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9OpP-00033w-0A for emacs-devel@gnu.org; Tue, 23 Jan 2007 11:49:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9OpO-00033r-SN for emacs-devel@gnu.org; Tue, 23 Jan 2007 11:48:58 -0500 Original-Received: from [62.67.228.11] (helo=pc3.berlin.powerweb.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9OpO-0008Q4-2i for emacs-devel@gnu.org; Tue, 23 Jan 2007 11:48:58 -0500 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id RAA05131 for ; Tue, 23 Jan 2007 17:48:48 +0100 X-Delivered-To: Original-Received: (qmail 14620 invoked from network); 23 Jan 2007 16:48:56 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 23 Jan 2007 16:48:56 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 089E924B4D; Tue, 23 Jan 2007 17:48:54 +0100 (CET) Original-To: belanger@truman.edu In-Reply-To: <87veixu2ep.fsf@vh213602.truman.edu> (Jay Belanger's message of "Tue\, 23 Jan 2007 10\:35\:25 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65412 Archived-At: Jay Belanger writes: > michael@cadilhac.name (Micha=C3=ABl Cadilhac) writes: > >> David Kastrup writes: >> >>> If I do >>> C-x C-f somefile.txt RET C-x C-s >>> in order to create and save an empty file, Emacs replies >>> >>> No changes need to be saved >>> >>> and does not actually save the file, even though saving the file would >>> change the state on disk. >> >> I can't reproduce it. > > I can, even with emacs -Q. I think Micha=C3=ABl assumed that I meant to open an _existing_ file. That does not make sense in connection with my report, but when just glancing over it, one might make this mistake. > It seems natural, if possibly incorrect, behavior. > If this is regarded as a bug, I would expect that an unchanged empty > file would be treated as a special case for C-xC-s. This is more about an unchanged _new_ file (it need not be empty if some template mechanism has filled in material already, and it is ok not to save if the empty file existed already). This would probably also apply for an existing file that has been changed on disk, but not in the Emacs buffer. In this case it might possibly make sense to ask the "revert buffer" question before saving. In the case of a non-existing file, there is nothing to revert to, however. --=20 David Kastrup