Subject: Re: bug#16062: 24.3; Missing .png file gives poor error message when opened

From: Eli Zaretskii <[email-masked]>
Date: Sat, 14 Dec 2013 08:51:46 +0200

> From: Juri Linkov <[email-masked]>
> Cc: Jarek Czekalski <[email-masked]>,  [email-masked]
> Date: Fri, 13 Dec 2013 23:58:03 +0200
> 
> > IOW, Emacs does the same in this case as when you type
> >
> >   C-x C-f non-existent-file.c RET
> >
> > In the latter case, you get an empty buffer that is in CC mode, and a
> > message "(New file)" in the echo area.
> 
> In this case the echo area displays "Loading cc-langs...done",
> but not "(New file)".
> 
> If we'll remove the message "Cannot display image: (Cannot
> determine image type)" from image-mode.el, then it still will
> display "Type C-c C-c to view the image as an image.",
> but not "(New file)" (but it's still visible in the *Messages* buffer).
> 
> So the problem of overridden messages is general.  A possible solution
> is to collect a batch of the latest messages and display them in the
> multi-line echo area.

Or maybe image-mode could display another "(New file)" when it
discovers that the buffer is empty.