GNU bug report logs - #9139
24.0.50; Inappropriate warning: "File no longer exists!"

Previous Next

Package: emacs;

Reported by: Bastien <bzg <at> altern.org>

Date: Thu, 21 Jul 2011 09:30:03 UTC

Severity: minor

Found in version 24.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Bastien <bzg <at> altern.org>
Subject: bug#9139: closed (Re: bug#9139: 24.0.50; Inappropriate warning:
 "File no longer exists!")
Date: Sun, 11 Sep 2011 06:05:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#9139: 24.0.50; Inappropriate warning: "File no longer exists!"

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 9139 <at> debbugs.gnu.org.

-- 
9139: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9139
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 9139-done <at> debbugs.gnu.org, bzg <at> altern.org
Subject: Re: bug#9139: 24.0.50; Inappropriate warning: "File no longer exists!"
Date: Sun, 11 Sep 2011 02:00:10 -0400
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 11 Sep 2011 04:52:29 +0200
> Cc: 9139 <at> debbugs.gnu.org
> 
> > 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))

The magic is in the previous line.  The code does this:

	      (or nowarn
		  (verify-visited-file-modtime buf)
		  (cond ((not (file-exists-p filename))
			 (setq nonexistent t)
			 (message "File %s no longer exists!" filename))

The problem was that verify-visited-file-modtime would return nil in
this case, where it returned t in Emacs 23.  And that's because the
internal details of verify-visited-file-modtime changed, but
insert-file-contents didn't have the corresponding change.  It does
now (revno 105721).

> (visited-file-modtime)
> => (-1 65535)
> 
> in foo.txt.  But is that a bug?

No.  -1 as the modtime exactly means that the file does not exist.  So
at most we need to update the doc string, assuming that we want to
reveal such implementation details.

Btw, WIBNI visited-file-modtime returned (-1 -1) in this case, instead
of forcing us to invoke the unsigned-to-signed converter in our heads?

> So I think that perhaps is should return 0?

Zero is for existing files that were not modified since visited.

[Message part 3 (message/rfc822, inline)]
From: Bastien <bzg <at> altern.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; Inappropriate warning: "File no longer exists!"
Date: Thu, 21 Jul 2011 11:29:39 +0200
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!

I suggest simply removing this warning is such a case.


In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5)
 of 2011-07-10 on myhost
Windowing system distributor `The X.Org Foundation', version 11.0.11002000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

-- 
 Bastien



This bug report was last modified 13 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.