From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Save unmodified buffer when file has been deleted Date: Fri, 11 Feb 2011 18:37:49 +0100 Message-ID: <87sjvutqtu.fsf@gnu.org> References: <87d3mz0vzn.fsf@altern.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297445885 17491 80.91.229.12 (11 Feb 2011 17:38:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2011 17:38:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 18:37:59 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 1PnwwP-0002ed-Na for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 18:37:57 +0100 Original-Received: from localhost ([127.0.0.1]:47808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnwwP-0003sK-3l for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 12:37:57 -0500 Original-Received: from [140.186.70.92] (port=33321 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnwwI-0003oP-U3 for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:37:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnwwH-0004UP-Nb for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:37:50 -0500 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:36052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnwwH-0004U3-Bn for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:37:49 -0500 Original-Received: by bwz16 with SMTP id 16so3403971bwz.0 for ; Fri, 11 Feb 2011 09:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:in-reply-to :references:user-agent:date:message-id:mime-version:content-type; bh=Eh/pUdPv5/yjvsqR22QOJivARFNd0O4U1+GmNVfBPZA=; b=LRbiv34OCczvkEo0qtUVfliW8yFqKHHIoVkhkXN5+mzZBk7nH6NO9049g1vne7tZR5 8SCieCG5KO8le9gLtn3jygkWx4eMFULSY2U+uTjleNcqq5d0ywRDjfVcfKmCN2kkbEl9 yopeu31W8c+Ybnr8RJwxU7oLnUWh+1Ng1HVZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; b=Tp9d3n4mCSGWlBePtkodqkyrs6d27gOC87n+HSNADIIPksM246ohDzVBwHYGu7WrrH owzDjykZoX74AmE2N9iUFHPZR5G+2fa3G7N7WC2X3wXs2KgKyPIzTBu5pjE3JrwZEQVI 24TyFMVFF3+8M78dNibaIPFT4KeB7Wr5lDiVQ= Original-Received: by 10.204.55.65 with SMTP id t1mr5009891bkg.140.1297445868305; Fri, 11 Feb 2011 09:37:48 -0800 (PST) Original-Received: from myhost.localdomain (fon75-1-78-192-119-5.fbxo.proxad.net [78.192.119.5]) by mx.google.com with ESMTPS id f20sm631809bkf.16.2011.02.11.09.37.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Feb 2011 09:37:45 -0800 (PST) Original-Received: by myhost.localdomain (Postfix, from userid 1000) id 6B5308871; Fri, 11 Feb 2011 18:37:49 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Fri, 11 Feb 2011 09:38:25 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 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:135901 Archived-At: Stefan Monnier writes: >> + (and (buffer-file-name) >> + (not (file-exists-p (buffer-file-name))))) > > Please just use the buffer-file-name variable rather than the > function. Done, thanks. > 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). Well, we shouldn't get used to hit useless keystrokes :) -- Bastien