From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#9139: 24.0.50; Inappropriate warning: "File no longer exists!" Date: Sun, 11 Sep 2011 04:52:29 +0200 Message-ID: References: <87d3h4t20s.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315709765 24518 80.91.229.12 (11 Sep 2011 02:56:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2011 02:56:05 +0000 (UTC) Cc: 9139@debbugs.gnu.org To: Bastien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 11 04:56:01 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R2aDB-0008OT-CI for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2011 04:56:01 +0200 Original-Received: from localhost ([::1]:59315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2aDA-0001O7-Te for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Sep 2011 22:56:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2aD6-0001I9-PC for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2011 22:55:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R2aD4-0005YY-CC for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2011 22:55:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2aD4-0005YR-Ac for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2011 22:55:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R2aH9-0008Tm-3J; Sat, 10 Sep 2011 23:00:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2011 03:00:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9139-submit@debbugs.gnu.org id=B9139.131571000332462 (code B ref 9139); Sun, 11 Sep 2011 03:00:06 +0000 Original-Received: (at 9139) by debbugs.gnu.org; 11 Sep 2011 03:00:03 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2aH4-0008RQ-I1 for submit@debbugs.gnu.org; Sat, 10 Sep 2011 23:00:03 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2aGz-0008Qc-Sh for 9139@debbugs.gnu.org; Sat, 10 Sep 2011 22:59:59 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R2aCo-0007Gx-18; Sun, 11 Sep 2011 04:55:38 +0200 In-Reply-To: <87d3h4t20s.fsf@gnu.org> (Bastien's message of "Thu, 21 Jul 2011 11:29:39 +0200") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Tara Jane O'Neil & Nikaido Kazumi's _Tara Jane O'Neil & Nikaido Kazumi_: "Say Yah" X-MailScanner-ID: 1R2aCo-0007Gx-18 MailScanner-NULL-Check: 1316314538.19267@T0BAPBh3RbIZoqWRLLNM0A X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 10 Sep 2011 23:00:07 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50829 Archived-At: Bastien writes: > Emacs sends an inappropriate warning message when trying to > find a file that isn't on the hardrive but is the filename of > a buffer, thus somehow "existing" in Emacs. > > To reproduce the problem: > > emacs -Q > C-x f ~/foo.txt > C-x b bar > C-x f ~/foo.txt > > => File no longer exists! Yes, it shouldn't say anything in this instance. But how? It's this code in files.el: (cond ((not (file-exists-p filename)) (setq nonexistent t) (message "File %s no longer exists!" filename)) Is there something stored in the buffer that's stored if the file once has existed, but no longer exists? Let's see... (visited-file-modtime) => (-1 65535) in foo.txt. But is that a bug? The doc string says: Return the current buffer's recorded visited file modification time. The value is a list of the form (HIGH LOW), like the time values that `file-attributes' returns. If the current buffer has no recorded file modification time, this function returns 0. So I think that perhaps is should return 0? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/