From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mathias Dahl" Newsgroups: gmane.emacs.devel Subject: Re: find-file for file that was deleted, when visiting buffer still exists Date: Sat, 3 Mar 2007 19:02:12 +0100 Message-ID: <7dbe73ed0703031002m6df03013uf23697339de79bda@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1172944955 20573 80.91.229.12 (3 Mar 2007 18:02:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Mar 2007 18:02:35 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 03 19:02:28 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 1HNYYt-0003ky-NP for ged-emacs-devel@m.gmane.org; Sat, 03 Mar 2007 19:02:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNYYt-000714-6Z for ged-emacs-devel@m.gmane.org; Sat, 03 Mar 2007 13:02:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNYYh-0006yi-Q2 for emacs-devel@gnu.org; Sat, 03 Mar 2007 13:02:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNYYg-0006yW-Pk for emacs-devel@gnu.org; Sat, 03 Mar 2007 13:02:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNYYg-0006yT-NJ for emacs-devel@gnu.org; Sat, 03 Mar 2007 13:02:14 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.173]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HNYYg-00054K-3K for emacs-devel@gnu.org; Sat, 03 Mar 2007 13:02:14 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so1081910ugf for ; Sat, 03 Mar 2007 10:02:13 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qZ/0alcLSeeKWy8rA8Kvbc9QRbKCDeS7RkqhGHrycY/alVHIPv6XaI8o4cB05uML74fXd8r1mqKeFM+V0XHqNQGkyk5fgWS1VGGH0uF791qyYZONiyL7pWMXmvtC/FqZzqcPBLc8PP3Dw1p5lKsmtRFfWCNtB7Vk6c3Nq+paxzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oxdOB9oV20YqOXXofFeWDJ0qQUkJTgWu6ym5HXTp9defEdjyZFXts0v3QeUMKDLe7tLIX/avEP9jiOhyJFWiogP3WyaoRo104xJv/Rr8TjlxNEgKZDb64C2mk1oOgPoEvbZpSBdtgRAvuuQ9vqmdz6D++4r62U6UpV8sjFi9hcA= Original-Received: by 10.78.18.3 with SMTP id 3mr402655hur.1172944933072; Sat, 03 Mar 2007 10:02:13 -0800 (PST) Original-Received: by 10.78.12.17 with HTTP; Sat, 3 Mar 2007 10:02:12 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:67264 Archived-At: > 1. Visit a file `foo' in a buffer. Close the window, but don't kill the > buffer. > > 2. Delete file `foo' (e.g. `delete-file' or some other way that doesn't also > kill the buffer). > > 3. `C-x C-f foo' > > This raises an error saying that the file no longer exists. > ... > Buffer `foo' was visiting file `foo', which no longer exists. > Choose one: > s RET - Save buffer `foo' as file `foo' > k RET - Visit a new, empty file in buffer `foo' > RET - Do nothing What about b RET - Switch to buffer `foo' I think that it would be useful to notify the user of the existing buffer. Who knows, maybe the file was deleted by mistake, which means the user is lucky that Emacs still has a copy of it. Unfortunately he might not find that out because of how Emacs currently handles this scenario. I agree with Drew, it would be nice with some changes here. Now or later.