From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer Date: Mon, 21 Feb 2022 14:57:48 +0200 Message-ID: <83sfscv0kz.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54084@debbugs.gnu.org To: Corwin Brust Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 14:43:58 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nM8yq-0004CC-SZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 14:43:57 +0100 Original-Received: from localhost ([::1]:37882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8yp-0002SO-Sp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 08:43:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM8GZ-0008VI-3J for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 07:58:13 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM8GQ-0002FN-OE for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 07:58:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nM8GQ-0007Sn-Gn for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 07:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54084 X-GNU-PR-Package: emacs Original-Received: via spool by 54084-submit@debbugs.gnu.org id=B54084.164544827328672 (code B ref 54084); Mon, 21 Feb 2022 12:58:02 +0000 Original-Received: (at 54084) by debbugs.gnu.org; 21 Feb 2022 12:57:53 +0000 Original-Received: from localhost ([127.0.0.1]:35323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM8GG-0007SN-O8 for submit@debbugs.gnu.org; Mon, 21 Feb 2022 07:57:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM8GE-0007SB-JL for 54084@debbugs.gnu.org; Mon, 21 Feb 2022 07:57:51 -0500 Original-Received: from [2001:470:142:3::e] (port=50574 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM8G8-0002DA-Rs; Mon, 21 Feb 2022 07:57:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LVcqgLlWQZnZf52yHMm1R8mLXS13xcJMr6X7nE5MOig=; b=VusWr9R1XQN+ +2k/vWN/gv4rgQKGAOvhsVpZmh7r+9NXoVoGstN6Uy3kHQbqhv2JZOIJP6zz7aaU0iK8abW68mljA Ddv38UYT6Qp97Zf5FcI6Xa5OZFQdIMh8oE1AcSzfpawhnchPgVfoWhj/Ngnn2pquRKKn0LlBkb2Og WS7xUmqkH0qyT2RLljezFvtcd+NFGzE57YIXD2XbHsZ0QudXU2Kh5gs2mc2P6pvJorCYddW4Rx6CJ tXyT/T/T/H3jC3H+S8mfh48Pr/tEd7FtigWjYWHqR6qEDjxfB4DOMFO5HGcvKAMBG/mbQp8fIf7YH 5vSDjZWZs75XJUMMyjLknA==; Original-Received: from [87.69.77.57] (port=1501 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM8G8-0007Zv-3U; Mon, 21 Feb 2022 07:57:44 -0500 In-Reply-To: (message from Corwin Brust on Mon, 21 Feb 2022 02:21:32 -0600) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227330 Archived-At: > From: Corwin Brust > Date: Mon, 21 Feb 2022 02:21:32 -0600 > > Under Emacs -Q > > 1. switch to a new buffer, e.g. C-x b *foo* RET > 2. M-x image-mode RET > 3. Insert the following text and press C-c C-c > > > fill="none" stroke="blue" stroke-width="2"/> > > > In Emacs 27.2 the outline of a rectangle is displayed as an image. > > In Emacs 28.0.91 an error is emitted at step 2: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > image-mode() > funcall-interactively(image-mode) > command-execute(image-mode record) > execute-extended-command(nil "image-mode" "image-mod") > funcall-interactively(execute-extended-command nil "image-mode" "image-mod") > command-execute(execute-extended-command) It's a feature, see bug#16062. (It misfired when the empty buffer wasn't visiting a file, but I've now fixed that on the release branch.) > Furthermore, inserting the text and pressing C-c C-c will do nothing > because the error interrupts the mode activation. (A subsequent M-x > image-mode RET after pasting in the snippet works.) > > Ergo, it is not possible to create an empty buffer in image-mode, as > was possible in Emacs 27.2 and before. You are supposed to insert the data, and then turn on image-mode. We don't support image-mode in empty buffers, because that makes it impossible to detect the image type, and thus leads to complications down the road. Thanks.