GNU bug report logs -
#9139
24.0.50; Inappropriate warning: "File no longer exists!"
Previous Next
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
Message #14 received at 9139 <at> debbugs.gnu.org (full text, mbox):
Bastien <bzg <at> altern.org> 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/
This bug report was last modified 13 years and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.