[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9139: 24.0.50; Inappropriate warning: "File no longer exists!"
From: |
Lars Magne Ingebrigtsen |
Subject: |
bug#9139: 24.0.50; Inappropriate warning: "File no longer exists!" |
Date: |
Sun, 11 Sep 2011 04:52:29 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Bastien <bzg@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/
- bug#9139: 24.0.50; Inappropriate warning: "File no longer exists!",
Lars Magne Ingebrigtsen <=