From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: save-query-if-deleted Date: Wed, 27 Sep 2006 14:12:45 +0200 Message-ID: <451A6ABD.2030806@gmx.at> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1159359245 20651 80.91.229.2 (27 Sep 2006 12:14:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2006 12:14:05 +0000 (UTC) Cc: Emacs Developement List Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 27 14:13:56 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GSYHM-0007af-9G for ged-emacs-devel@m.gmane.org; Wed, 27 Sep 2006 14:12:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSYHL-0004zz-Pk for ged-emacs-devel@m.gmane.org; Wed, 27 Sep 2006 08:12:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GSYH6-0004vl-Kc for emacs-devel@gnu.org; Wed, 27 Sep 2006 08:12:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GSYH4-0004sd-59 for emacs-devel@gnu.org; Wed, 27 Sep 2006 08:12:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSYH3-0004sB-Km for emacs-devel@gnu.org; Wed, 27 Sep 2006 08:12:25 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GSYLt-00051k-83 for emacs-devel@gnu.org; Wed, 27 Sep 2006 08:17:25 -0400 Original-Received: (qmail invoked by alias); 27 Sep 2006 12:12:22 -0000 Original-Received: from N955P005.adsl.highway.telekom.at (EHLO [62.47.63.69]) [62.47.63.69] by mail.gmx.net (mp042) with SMTP; 27 Sep 2006 14:12:22 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: Karl Chen In-Reply-To: X-Y-GMX-Trusted: 0 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:60268 Archived-At: > I propose the patch below which adds the variable > `save-query-if-deleted'. If non-nil, the `basic-save-buffer' will > query before saving if the file has been deleted, but existed > since last visited/saved. > > In this patch it defaults to nil, but I think it is a very useful > feature. Usually when a file no longer exists it's because I > renamed it in a shell window and forgot to re-open it in Emacs; in > these situations, saving it should require confirmation. > > What do you think? I'd appreciate it. If `buffer-file-name' and `save-query-if-deleted' are both non-nil, I'd have `buffer-save-buffer' ask whether to save the buffer even if it was not modified.