From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs 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) Message-ID: <7551034a-2464-4925-9020-20e853e2db3d@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1475425884 15755 195.159.176.226 (2 Oct 2016 16:31:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Oct 2016 16:31:24 +0000 (UTC) To: 24586@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 02 18:31:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqjfH-00011p-92 for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Oct 2016 18:30:59 +0200 Original-Received: from localhost ([::1]:60141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjfF-0000gf-Sr for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Oct 2016 12:30:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjcX-0007Kl-0A for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:28:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqjcQ-00042I-Iz for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:28:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjcQ-00042A-GT for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bqjcQ-00031Y-Cg for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Oct 2016 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24586 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147542567311600 (code B ref -1); Sun, 02 Oct 2016 16:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Oct 2016 16:27:53 +0000 Original-Received: from localhost ([127.0.0.1]:42120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqjcG-000312-Uw for submit@debbugs.gnu.org; Sun, 02 Oct 2016 12:27:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqjcE-00030m-TS for submit@debbugs.gnu.org; Sun, 02 Oct 2016 12:27:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqjc8-0003oo-QZ for submit@debbugs.gnu.org; Sun, 02 Oct 2016 12:27:45 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:51651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjc8-0003oA-Nx for submit@debbugs.gnu.org; Sun, 02 Oct 2016 12:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjc6-00070Q-C3 for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:27:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqjc1-0003kU-8w for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:27:41 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:25736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjc0-0003jK-WF for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:27:37 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u92GRYHR022957 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 2 Oct 2016 16:27:34 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u92GRYqk028536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 2 Oct 2016 16:27:34 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u92GRWIO023973 for ; Sun, 2 Oct 2016 16:27:33 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123900 Archived-At: 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=3D/c/usr --host=3Di686-pc-mingw32'