From unknown Tue Aug 19 02:59:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 08:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 54084@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164543170931730 (code B ref -1); Mon, 21 Feb 2022 08:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2022 08:21:49 +0000 Received: from localhost ([127.0.0.1]:34967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM3x7-0008Fg-0f for submit@debbugs.gnu.org; Mon, 21 Feb 2022 03:21:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:49386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM3x6-0008Fa-6O for submit@debbugs.gnu.org; Mon, 21 Feb 2022 03:21:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM3x5-0004Vp-TC for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 03:21:47 -0500 Received: from mail-ed1-f45.google.com ([209.85.208.45]:34342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM3x4-0006fz-1T for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 03:21:47 -0500 Received: by mail-ed1-f45.google.com with SMTP id z22so27633543edd.1 for ; Mon, 21 Feb 2022 00:21:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5H43fQuxCHrOIZO5gbT/0EoWpk7oA215e3JcFs5CHrw=; b=GNMeewEEpdiFtCKqlTtDADH+FunMOnREFPKPgzJrG/mRfyglr9AvbAPupjtvW3qgpZ y3ZIbfg9kXIePbTES4S23AUMczrFGDN3nAXJwNOY5+XhwIrUPjMldk6+1aKj0SNl/3xY Xnt6TYsTpqgLtV6xII2/Rktxo8G1pc1TIcxCOZgQD3WcNtiIlYCKrEx5UhtBpyGO7HhZ 0+/HunsgfH1zqKohCYr14dDoFh72vVnLZkLN1+t02P8wMfjmGqt4SB+KNhrh7SynZyEH 4uKuTOGfH4qm9Ltkwl4yob9DF09t3PCROkz3USfMzSbe4geYcXi6wyon86LaWvxHO032 PMZQ== X-Gm-Message-State: AOAM530YLfOdpfSKZMxUZdX8AC8JXMwh6OAnQg8jcoQnKGmn0UriHiDs EPIhIETKd1Y3cRlEmlhxxWh+/NLq/sMVRYafhEm+2NN5cGw= X-Google-Smtp-Source: ABdhPJx3t8ktg7y025+c+QKUGaYZ90lJsOVpFjfUDHRhzh8MS5/4C3pEWlQuCgnNzJMkMITlP4awgdQQqtvYCAgWSQo= X-Received: by 2002:a50:9f89:0:b0:411:b6c9:b436 with SMTP id c9-20020a509f89000000b00411b6c9b436mr20266122edf.413.1645431703918; Mon, 21 Feb 2022 00:21:43 -0800 (PST) MIME-Version: 1.0 From: Corwin Brust Date: Mon, 21 Feb 2022 02:21:32 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.45; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f45.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) 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 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) 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. In GNU Emacs 28.0.91 (build 6, x86_64-w64-mingw32) of 2022-02-05 built on AVALON Repository revision: 821c240075e3b850a61207d18d520126292421ce Repository branch: emacs-28-nt-dist-build Windowing system distributor 'Microsoft Corp.', version 10.0.19043 System Description: Microsoft Windows 10 Home (v10.0.2009.19043.1566) Configured using: 'configure --with-json --without-dbus --with-native-compilation --without-compress-install CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: ENU locale-coding-system: cp1252 Major mode: Image[svg] Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq help-fns radix-tree time-date subr-x cl-print debug backtrace help-mode find-func image-mode dired dired-loaddefs exif cl-loaddefs cl-lib cus-start cus-load iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 87195 11377) (symbols 48 8253 0) (strings 32 24379 1444) (string-bytes 1 764439) (vectors 16 14960) (vector-slots 8 313276 16186) (floats 8 38 231) (intervals 56 402 2) (buffers 992 13)) From unknown Tue Aug 19 02:59:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer 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 X-GNU-PR-Keywords: To: Corwin Brust Cc: 54084@debbugs.gnu.org Received: via spool by 54084-submit@debbugs.gnu.org id=B54084.164544827328672 (code B ref 54084); Mon, 21 Feb 2022 12:58:02 +0000 Received: (at 54084) by debbugs.gnu.org; 21 Feb 2022 12:57:53 +0000 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 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 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==; 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 Date: Mon, 21 Feb 2022 14:57:48 +0200 Message-Id: <83sfscv0kz.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Mon, 21 Feb 2022 02:21:32 -0600) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From unknown Tue Aug 19 02:59:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 13:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 54084@debbugs.gnu.org Received: via spool by 54084-submit@debbugs.gnu.org id=B54084.164545193810927 (code B ref 54084); Mon, 21 Feb 2022 13:59:01 +0000 Received: (at 54084) by debbugs.gnu.org; 21 Feb 2022 13:58:58 +0000 Received: from localhost ([127.0.0.1]:35457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9DO-0002qB-7r for submit@debbugs.gnu.org; Mon, 21 Feb 2022 08:58:58 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:46601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9DM-0002pw-St for 54084@debbugs.gnu.org; Mon, 21 Feb 2022 08:58:57 -0500 Received: by mail-ej1-f50.google.com with SMTP id qx21so33426454ejb.13 for <54084@debbugs.gnu.org>; Mon, 21 Feb 2022 05:58:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ACqrWY4zW42KwnCsCr6Sb7cJO6OxXucTp4nBWQmQi/w=; b=TYNvVok18nfSoH8g0uxMUwEgYXCCO7tqKia2NS65OZn+9qJ0cJ+oG2+lt7ewBz5w9N 1xKciu0OeUtGR9NN2S+59811RJhGKyX5JSYtrfQgC8NiGwPKFvrjsg++V+eqzI1Vpzgw eXtQ/Cw8E9xHgdoQUzcSaNOVJ1lHvOGYGe1rRa0GHDoqip2J5YtjgvRnntrG90HYRmCQ U3aqXQuE/13aOtm4JQvjHEDPUyuaHKaCXSxqyIrT9zPQUnfwskmVtYBy8Vvui6MLic8A TXfybPCJZ/GPCKzzXHCKvSmtNw6Po7n/2N37URoEv4m2Ei9wB7iD/wxK3ov4AFL4e0cp iglg== X-Gm-Message-State: AOAM531CIkpxzzdxB/50Pb6c+OuwaWV0JqU0wHnPAMOo2s+ADsi1p+Zr Ip+9qAYAj7OZ8RyT1uz/KJx4gLMiz5RkSRXs23g= X-Google-Smtp-Source: ABdhPJwBPu0Q2AE8HazMZ0pb5nAXKksdEVGyZFOsKIET5XWE70R9/nI1rbc+7MokPIImjnC514SpbnX9ln+wzJUQbPo= X-Received: by 2002:a17:906:848a:b0:6ce:b94d:b907 with SMTP id m10-20020a170906848a00b006ceb94db907mr15419062ejx.310.1645451930892; Mon, 21 Feb 2022 05:58:50 -0800 (PST) MIME-Version: 1.0 References: <83sfscv0kz.fsf@gnu.org> In-Reply-To: <83sfscv0kz.fsf@gnu.org> From: Corwin Brust Date: Mon, 21 Feb 2022 07:58:39 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tags 54084 + fixed close 54084 28.0.91 # thanks for the prompt fix bye On Mon, Feb 21, 2022 at 6:57 AM Eli Zaretskii wrote: > > 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.) > This has my stuff working again; much appreciated. I have (tried to) mark the bug as done/fixed but please LMK if that wasn't TRT. From unknown Tue Aug 19 02:59:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 14:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: 54084@debbugs.gnu.org Received: via spool by 54084-submit@debbugs.gnu.org id=B54084.164545202011186 (code B ref 54084); Mon, 21 Feb 2022 14:01:01 +0000 Received: (at 54084) by debbugs.gnu.org; 21 Feb 2022 14:00:20 +0000 Received: from localhost ([127.0.0.1]:35462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9Ei-0002uM-IC for submit@debbugs.gnu.org; Mon, 21 Feb 2022 09:00:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9Ed-0002tz-TN for 54084@debbugs.gnu.org; Mon, 21 Feb 2022 09:00:19 -0500 Received: from [2001:470:142:3::e] (port=51842 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 1nM9EX-0005C9-Og; Mon, 21 Feb 2022 09:00:10 -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=7NcdYo3HwCj1CNslel0z/s+GySHt0QYdo3VoyOW3mGA=; b=Tvu10V6XWReX /57VlB8JM1Y7R51LlnnAREauton2ezZp+ep9OGnYPuZWOhjYdCqMMhOadPTifgI8zBiRoBE4nenWY TaZvK+sXMRudFXm9soWYfDd/WkcsNbC0K4IZNvQc1Axtgy1cd0m2xuTON0Bu+ntGYFdU0i2WZLFbk 7OEHrYVb1Q0Esm5BwI8c7SjPJh4o1gfpVrarZkX5CimNFadROheTPwo3Omd8TcxyPloATUbClNNVm alO5u7QZVBYIHbaHt+QpNJqnDJxPosfM+YhGJcS4W1xbDW4FNYTVY3uSD74eww7sruU9AmBXHoUdB MSWmFi5YNVBPdnDROZ1OyQ==; Received: from [87.69.77.57] (port=1545 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 1nM9EW-0002bR-5E; Mon, 21 Feb 2022 09:00:09 -0500 Date: Mon, 21 Feb 2022 16:00:12 +0200 Message-Id: <83mtikuxoz.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Mon, 21 Feb 2022 07:41:36 -0600) References: <83sfscv0kz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [Please use Reply All, so that the bug tracker remains on the CC.] > From: Corwin Brust > Date: Mon, 21 Feb 2022 07:41:36 -0600 > > On Mon, Feb 21, 2022 at 6:57 AM Eli Zaretskii wrote: > > > > 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.) > > Is there a way to disable this feature? Why is that needed? Turning on image-mode in an empty buffer is a pretty strange thing to do, or at least a rare thing. > In my case the image type won't change, I'd be fine hard-coding > that. > > > > > 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. > > I'm not sure how to avoid this error when I create a new buffer in a > mode derived from image mode. Can't you use ignore-errors? > Is there an alternative you can recommend to creating my own > "one-off" version of image mode and deriving from that? In my case, > I have created an SVG sketching mode and have been reusing, > e.g. "canvas" resizing logic from image-mode for a couple of years > without issue. > > TIA for any hints. How about delaying the mode switch until the user inserted something? From unknown Tue Aug 19 02:59:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Corwin Brust Subject: bug#54084: closed (Re: bug#54084: 28.0.91; Regression: can't create empty image buffer) Message-ID: References: <83ley4uxj3.fsf@gnu.org> X-Gnu-PR-Message: they-closed 54084 X-Gnu-PR-Package: emacs Reply-To: 54084@debbugs.gnu.org Date: Mon, 21 Feb 2022 14:04:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1645452242-11662-1" This is a multi-part message in MIME format... ------------=_1645452242-11662-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #54084: 28.0.91; Regression: can't create empty image buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 54084@debbugs.gnu.org. --=20 54084: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54084 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1645452242-11662-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 54084-done) by debbugs.gnu.org; 21 Feb 2022 14:03:51 +0000 Received: from localhost ([127.0.0.1]:35492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9I7-00031h-7F for submit@debbugs.gnu.org; Mon, 21 Feb 2022 09:03:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9I5-00031S-48 for 54084-done@debbugs.gnu.org; Mon, 21 Feb 2022 09:03:49 -0500 Received: from [2001:470:142:3::e] (port=51918 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 1nM9Hx-00060f-US; Mon, 21 Feb 2022 09:03:41 -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=67A3RCDYTHRG8w7Yy6LL88cX1lCn+IIs/uukcsnPPMg=; b=hyWRDlRTvAtk TTdaYYwiR0Iqz1kSuB4rv6iXXw+jX2p2Beu924E8gyT8W5G/4bX/EVm7gle+aLVmoJk94Xr8Ip6Xx l99zSFZBR0vl6oQEDqC8cCIvBlCUmKT3ZFQT7CYnysToCpEu4PUmIJBgdM5YqzByg62/XlC3+lBPF 4IcWz52dI08+CBMzjn9OS4ESN6DOOjfi1z1moDCJhwNPQdbIKOdNY1v9+8VdGFePqL9NiBHIBcSvC e6MHUXm8R9GQ1Q0u8y+TND2h3KJKc9ANzVDtLB7APbzhlcvqBoOBmz/EdMwbN8j9Ds86vZZb0VoGZ zFObVhDGCS1wu5/RvhXtVw==; Received: from [87.69.77.57] (port=1767 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 1nM9Hv-0000Q3-6g; Mon, 21 Feb 2022 09:03:41 -0500 Date: Mon, 21 Feb 2022 16:03:44 +0200 Message-Id: <83ley4uxj3.fsf@gnu.org> From: Eli Zaretskii To: Corwin Brust In-Reply-To: (message from Corwin Brust on Mon, 21 Feb 2022 07:58:39 -0600) Subject: Re: bug#54084: 28.0.91; Regression: can't create empty image buffer References: <83sfscv0kz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54084-done Cc: 54084-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Corwin Brust > Date: Mon, 21 Feb 2022 07:58:39 -0600 > Cc: 54084@debbugs.gnu.org > > This has my stuff working again; much appreciated. Thanks, closing. P.S. Your attempts to close didn't work, probably because you didn't add a BCC to control@debbugs.gnu.org. ------------=_1645452242-11662-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Feb 2022 08:21:49 +0000 Received: from localhost ([127.0.0.1]:34967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM3x7-0008Fg-0f for submit@debbugs.gnu.org; Mon, 21 Feb 2022 03:21:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:49386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM3x6-0008Fa-6O for submit@debbugs.gnu.org; Mon, 21 Feb 2022 03:21:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM3x5-0004Vp-TC for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 03:21:47 -0500 Received: from mail-ed1-f45.google.com ([209.85.208.45]:34342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM3x4-0006fz-1T for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 03:21:47 -0500 Received: by mail-ed1-f45.google.com with SMTP id z22so27633543edd.1 for ; Mon, 21 Feb 2022 00:21:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5H43fQuxCHrOIZO5gbT/0EoWpk7oA215e3JcFs5CHrw=; b=GNMeewEEpdiFtCKqlTtDADH+FunMOnREFPKPgzJrG/mRfyglr9AvbAPupjtvW3qgpZ y3ZIbfg9kXIePbTES4S23AUMczrFGDN3nAXJwNOY5+XhwIrUPjMldk6+1aKj0SNl/3xY Xnt6TYsTpqgLtV6xII2/Rktxo8G1pc1TIcxCOZgQD3WcNtiIlYCKrEx5UhtBpyGO7HhZ 0+/HunsgfH1zqKohCYr14dDoFh72vVnLZkLN1+t02P8wMfjmGqt4SB+KNhrh7SynZyEH 4uKuTOGfH4qm9Ltkwl4yob9DF09t3PCROkz3USfMzSbe4geYcXi6wyon86LaWvxHO032 PMZQ== X-Gm-Message-State: AOAM530YLfOdpfSKZMxUZdX8AC8JXMwh6OAnQg8jcoQnKGmn0UriHiDs EPIhIETKd1Y3cRlEmlhxxWh+/NLq/sMVRYafhEm+2NN5cGw= X-Google-Smtp-Source: ABdhPJx3t8ktg7y025+c+QKUGaYZ90lJsOVpFjfUDHRhzh8MS5/4C3pEWlQuCgnNzJMkMITlP4awgdQQqtvYCAgWSQo= X-Received: by 2002:a50:9f89:0:b0:411:b6c9:b436 with SMTP id c9-20020a509f89000000b00411b6c9b436mr20266122edf.413.1645431703918; Mon, 21 Feb 2022 00:21:43 -0800 (PST) MIME-Version: 1.0 From: Corwin Brust Date: Mon, 21 Feb 2022 02:21:32 -0600 Message-ID: Subject: 28.0.91; Regression: can't create empty image buffer To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.45; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f45.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) 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 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) 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. In GNU Emacs 28.0.91 (build 6, x86_64-w64-mingw32) of 2022-02-05 built on AVALON Repository revision: 821c240075e3b850a61207d18d520126292421ce Repository branch: emacs-28-nt-dist-build Windowing system distributor 'Microsoft Corp.', version 10.0.19043 System Description: Microsoft Windows 10 Home (v10.0.2009.19043.1566) Configured using: 'configure --with-json --without-dbus --with-native-compilation --without-compress-install CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: ENU locale-coding-system: cp1252 Major mode: Image[svg] Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq help-fns radix-tree time-date subr-x cl-print debug backtrace help-mode find-func image-mode dired dired-loaddefs exif cl-loaddefs cl-lib cus-start cus-load iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 87195 11377) (symbols 48 8253 0) (strings 32 24379 1444) (string-bytes 1 764439) (vectors 16 14960) (vector-slots 8 313276 16186) (floats 8 38 231) (intervals 56 402 2) (buffers 992 13)) ------------=_1645452242-11662-1-- From unknown Tue Aug 19 02:59:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54084: 28.0.91; Regression: can't create empty image buffer Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 54084@debbugs.gnu.org Received: via spool by 54084-submit@debbugs.gnu.org id=B54084.164545299416369 (code B ref 54084); Mon, 21 Feb 2022 14:17:01 +0000 Received: (at 54084) by debbugs.gnu.org; 21 Feb 2022 14:16:34 +0000 Received: from localhost ([127.0.0.1]:35528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9UP-0004Fm-V2 for submit@debbugs.gnu.org; Mon, 21 Feb 2022 09:16:34 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:39813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9UL-0004AV-18 for 54084@debbugs.gnu.org; Mon, 21 Feb 2022 09:16:32 -0500 Received: by mail-ed1-f49.google.com with SMTP id u18so29690510edt.6 for <54084@debbugs.gnu.org>; Mon, 21 Feb 2022 06:16:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Lc2rbwApNvXtERTY7onkregx5QbbMyGfGY72aLafjuM=; b=bTJcSok+BQX6cEfLwCkSKW4o04b7IR4C+HK4V0MwYRv7Mny/0RSkGKapaPU0s2GZCG w+ElbXGvNulEu6TWd8kvhyWtkaymNvVjN6EfbjRmZpuzl6rCiBMQOk3Q7VDygDcZ/u7h lrY/cSh15zUnsvyKrS38TL/LPdarwQvpkRB//RDdSb8g6n+buIEs+QubexRQwhwA7GSx tcK3q4b6TA8fHjhis7q/U8VlJWbH+b7qzTp0OSI9Em/iMi1Lw96BfUOP5UHlAE9IDB5b oB7xBaiDBzwJbh9Lz0PsYafrsmlGftZiNIAzGadBxy8r0SHLl9/HUoeXlydXapFCSlTg wVDQ== X-Gm-Message-State: AOAM532o1G4wpJOgQvNNdXDsS6WDUxtk1V1WlSuOJ5d3Lvc+pf4a3xxE n2lfpAdecWeLt7BauWsDBUq8hCro7D6cEC7tRVI= X-Google-Smtp-Source: ABdhPJz3EWVeeQvyGVuZyIkGw/RClMqseFuCbHJAfj2jGXpzkTGDNtP6YJrhyCTmX4w8eU2dE4iPu57y8jj4sVyeoME= X-Received: by 2002:a05:6402:1e8f:b0:3fa:72cb:1733 with SMTP id f15-20020a0564021e8f00b003fa72cb1733mr20947434edf.24.1645452983209; Mon, 21 Feb 2022 06:16:23 -0800 (PST) MIME-Version: 1.0 References: <83sfscv0kz.fsf@gnu.org> <83mtikuxoz.fsf@gnu.org> In-Reply-To: <83mtikuxoz.fsf@gnu.org> From: Corwin Brust Date: Mon, 21 Feb 2022 08:16:11 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Mon, Feb 21, 2022 at 8:00 AM Eli Zaretskii wrote: > > [Please use Reply All, so that the bug tracker remains on the CC.] Sorry about that. > > From: Corwin Brust > > Date: Mon, 21 Feb 2022 07:41:36 -0600 > > > > Is there a way to disable this feature? > > Why is that needed? Turning on image-mode in an empty buffer is a > pretty strange thing to do, or at least a rare thing. Noted, thanks. FTR, for dungeon I have several modes that are derived from image-mode, e.g. for displaying graphical character sheets, combat status information, and maps. I also have a point-and-click drawing mode for creating/editing "tile-sets" and composing (e.g.) maps for dungeon levels using these "named SVG fragments". > > Can't you use ignore-errors? > > How about delaying the mode switch until the user inserted something? I will look into these options. (So far, the change you made seems to have all my stuff working again per the release branch.)