[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24586: 24.5; `find-file' for non-existent file a.jpg should not comp

From: Drew Adams
Subject: bug#24586: 24.5; `find-file' for non-existent file a.jpg should not complain
Date: Sun, 2 Oct 2016 09:27:31 -0700 (PDT)

emacs -Q

C-x C-f a.jpg     ; Where file `a.jpg' does not exist

This presents these error/warning messages, but it does not raise an

  Type C-c C-c to view the image as an image.
  Cannot display image: (Cannot determine image type)

This seems wrong, because the file does not exist.  If you are trying to
create an ordinary text file that happens to match an image-file name
pattern, you should be able to do so, without getting such messages.  It
could be helpful to instead get a message confirming that this is in
fact what you are doing.

Or if it is considered wrong to do that then Emacs should raise an

IOW, either raise an error, if you are not allowed to create a new file
whose name matches an image file, or else show a different message,
saying, e.g., that no such image file exists and the buffer is therefore
not in image mode (and it should in that case not be put in image mode).

It seems wrong to both put the new buffer for the non-existent file in
image mode and to complain that Emacs cannot display the image.  And
the first message, about typing C-c C-c seems doubly inappropriate.

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]