From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 56773@debbugs.gnu.org
Subject: bug#56773: 29.0.50; (readablep UNREADABLE) causes strange things
Date: Tue, 26 Jul 2022 14:31:19 +0200 [thread overview]
Message-ID: <87mtcw2gyw.fsf@gnus.org> (raw)
In-Reply-To: <87tu741qwi.fsf@web.de> (Michael Heerdegen's message of "Tue, 26 Jul 2022 05:42:05 +0200")
Michael Heerdegen <michael_heerdegen@web.de> writes:
> (progn (readablep (current-window-configuration))
> (current-buffer))
> ==> #<buffer prin1>
>
> After evaluating such a `readablep' call, weird things can happen
> because of this buffer being current. I tried to actually display that
> buffer and the window I got looked quite funny, one second later Emacs
> had crashed.
Oops.
The problem is trivial to fix in `unreadablep' (just smack a
`save-excursion' in there), but I think this should be fixed in a better
way. The problem is that PRINTPREPARE sets the current buffer to the
super-duper secret buffer Vprin1_to_string_buffer (i.e., " prin1"), and
we should restore the real buffer before calling
`print-unreadable-function' in `print_vectorlike'.
But which buffer that was doesn't seem to be available at that point --
it's just stored in
#define PRINTPREPARE \
struct buffer *old = current_buffer; \
So we'd need to store that in a way we can access it later, but I'm not
sure where/how it'd make the most sense to do so... Any ideas?
Meanwhile I've pushed a failing test for this to the trunk.
next prev parent reply other threads:[~2022-07-26 12:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 3:42 bug#56773: 29.0.50; (readablep UNREADABLE) causes strange things Michael Heerdegen
2022-07-26 12:31 ` Lars Ingebrigtsen [this message]
2022-07-26 12:39 ` Eli Zaretskii
2022-07-26 12:44 ` Lars Ingebrigtsen
2022-07-26 13:12 ` Eli Zaretskii
2022-07-26 13:24 ` Lars Ingebrigtsen
2022-07-27 9:30 ` Lars Ingebrigtsen
2022-07-27 9:41 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-27 9:51 ` Lars Ingebrigtsen
2022-07-27 9:41 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-27 9:58 ` Lars Ingebrigtsen
2022-07-27 11:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-28 1:47 ` Michael Heerdegen
2022-07-28 2:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-28 9:48 ` Lars Ingebrigtsen
2022-07-28 10:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-28 10:46 ` Lars Ingebrigtsen
2022-07-28 11:06 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-28 11:09 ` Lars Ingebrigtsen
2022-07-28 11:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=87mtcw2gyw.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=56773@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
/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).