GNU bug report logs -
#54084
28.0.91; Regression: can't create empty image buffer
Previous Next
Reported by: Corwin Brust <corwin <at> bru.st>
Date: Mon, 21 Feb 2022 08:22:01 UTC
Severity: normal
Found in version 28.0.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Corwin Brust <corwin <at> bru.st>
> 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
>
> <svg width="400" height="400">
> <rect x="100" y="100" width="200" height="100"
> fill="none" stroke="blue" stroke-width="2"/>
> </svg>
>
> 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.
This bug report was last modified 3 years and 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.