unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 24586@debbugs.gnu.org
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)	[thread overview]
Message-ID: <7551034a-2464-4925-9020-20e853e2db3d@default> (raw)

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
error:

  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
error.

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	other threads:[~2016-10-02 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 16:27 Drew Adams [this message]
2016-10-05  0:04 ` bug#24586: 24.5; `find-file' for non-existent file a.jpg should not complain npostavs
2020-08-20 21:01 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7551034a-2464-4925-9020-20e853e2db3d@default \
    --to=drew.adams@oracle.com \
    --cc=24586@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).