Subject: bug#2077 closed by Chong Yidong <[email-masked]> (Re: 23.0.60; error raised if visit new, empty file foo.jpeg)

From: [email-masked] (Emacs bug Tracking System)
Date: Tue, 27 Jan 2009 15:00:04 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#2077: 23.0.60; error raised if visit new, empty file foo.jpeg

It has been closed by Chong Yidong <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <[email-masked]> by
replying to this email.

-- 
2077: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2077
Emacs Bug Tracking System
Contact [email-masked] with problems

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.

Subject: 23.0.60; error raised if visit new, empty file foo.jpeg
From: "Drew Adams" <[email-masked]>
To: <[email-masked]>
Date: Mon, 26 Jan 2009 14:32:56 -0800

This is similar to bug #2058, but the error raised here is much less
bewildering. ;-)
 
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.

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2009-01-04 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'