Subject: Re: 23.0.60; error raised if visit new, empty file foo.jpeg
From: Chong Yidong <[email-masked]>
To: "Drew Adams" <[email-masked]>
Cc: [email-masked]
Date: Tue, 27 Jan 2009 09:54:34 -0500

> emacs -Q
> 
> C-x C-f foo.jpeg
> 
> That raises this error:
> "File mode specification error: (error "Cannot determine image type")"
> 
> I don't think an error should be raised until the buffer is saved.  I
> could be wrong about that.  In any case, the error message should be
> something more appropriate.

The error occurs because Emacs is trying to display the image, and is
unable to do so.  It has nothing to do with saving the buffer.

Note that image-mode does not assume that the file is in jpeg format
based on the file name alone: it examines the file contents as well.  We
could, in principle, replace this error message with a more generic
message, but that would be less helpful for debugging.