From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Save unmodified buffer when file has been deleted Date: Fri, 11 Feb 2011 09:38:25 -0500 Message-ID: References: <87d3mz0vzn.fsf@altern.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297435313 20043 80.91.229.12 (11 Feb 2011 14:41:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2011 14:41:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Bastien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 15:41:49 2011 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.69) (envelope-from ) id 1PnuBs-00053V-Ul for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 15:41:45 +0100 Original-Received: from localhost ([127.0.0.1]:49499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnuBs-0004VZ-Qe for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 09:41:44 -0500 Original-Received: from [140.186.70.92] (port=55919 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnu8i-0002ug-95 for emacs-devel@gnu.org; Fri, 11 Feb 2011 09:38:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pnu8g-0000QF-Vh for emacs-devel@gnu.org; Fri, 11 Feb 2011 09:38:27 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:14209 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pnu8g-0000Q4-R8 for emacs-devel@gnu.org; Fri, 11 Feb 2011 09:38:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAN7YVE1FxIyy/2dsb2JhbAClc3S7A4VdBIUBjzk X-IronPort-AV: E=Sophos;i="4.60,455,1291611600"; d="scan'208";a="91325302" Original-Received: from 69-196-140-178.dsl.teksavvy.com (HELO ceviche.home) ([69.196.140.178]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 11 Feb 2011 09:38:25 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9BB6E660C9; Fri, 11 Feb 2011 09:38:25 -0500 (EST) In-Reply-To: <87d3mz0vzn.fsf@altern.org> (Bastien's message of "Fri, 11 Feb 2011 10:19:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:135891 Archived-At: > + (and (buffer-file-name) > + (not (file-exists-p (buffer-file-name))))) Please just use the buffer-file-name variable rather than the function. Other than that, it looks like a good change (I've gotten used to hitting SPC Backspace C-x C-s, and I also use this when I just want to `touch' the file, so I probably won't use this feature much, tho). Stefan