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#56773: 29.0.50; (readablep UNREADABLE) causes strange things Date: Tue, 26 Jul 2022 16:12:11 +0300 Message-ID: <83ilnkc91w.fsf@gnu.org> References: <87tu741qwi.fsf@web.de> <87mtcw2gyw.fsf@gnus.org> <83pmhscajq.fsf@gnu.org> <8735eo2gcw.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34383"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, 56773@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 26 15:13:15 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 1oGKN9-0008nZ-16 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 15:13:15 +0200 Original-Received: from localhost ([::1]:51360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGKN8-0008Ou-0f for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 09:13:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGKMw-0008Mc-FL for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 09:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGKMv-0000qe-WA for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 09:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGKMv-0006qT-Rf for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 09:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jul 2022 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56773 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 56773-submit@debbugs.gnu.org id=B56773.165884113626249 (code B ref 56773); Tue, 26 Jul 2022 13:13:01 +0000 Original-Received: (at 56773) by debbugs.gnu.org; 26 Jul 2022 13:12:16 +0000 Original-Received: from localhost ([127.0.0.1]:52634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGKMC-0006pI-7z for submit@debbugs.gnu.org; Tue, 26 Jul 2022 09:12:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGKM8-0006p0-FR for 56773@debbugs.gnu.org; Tue, 26 Jul 2022 09:12:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGKM3-0000lt-2f; Tue, 26 Jul 2022 09:12:07 -0400 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=x00w5X5UFyJxmaNIlj2z5MHb/uZ0zRpELTIjKrM+akg=; b=r5r10YE3IubJ QKFufPUjdpmZHCOYYeVdhQGy15XQ7VYd7G+rAWoZ+DvQHksCx67QUpFvYzvokgAem8Ad7Ov881H+l Rr2AyShCGNwhnjZQwbbOBKp14kuoPRrK/G7zZqSB9bWwkaTqFPJmoDP2lukqLPGWwIFkr3f11pyGX rhzGFUx4m88CEDix5ixvw4aGSSaGnhXKmCaCzz0vUH7zRiPrPS3efXFcXPuo4X1F0RePKevjCrtwn vsswGuUWydwN6taRbYTZvH37l+fkTjGTl6nABEV9yOOu40eSB4IPps04YhD0k1JHg5HyIr3J65v53 fRzqhmsOTbnG+tr4VSE0DA==; Original-Received: from [87.69.77.57] (port=4259 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 1oGKM2-0003XY-Ij; Tue, 26 Jul 2022 09:12:06 -0400 In-Reply-To: <8735eo2gcw.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 26 Jul 2022 14:44:31 +0200) 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:237968 Archived-At: > From: Lars Ingebrigtsen > Cc: michael_heerdegen@web.de, 56773@debbugs.gnu.org > Date: Tue, 26 Jul 2022 14:44:31 +0200 > > Eli Zaretskii writes: > > > unwind_protect? > > Where would the unwind_protect be? > > The problem is here: > > if (!NILP (Vprint_unreadable_function) > && FUNCTIONP (Vprint_unreadable_function)) > { > specpdl_ref count = SPECPDL_INDEX (); > /* Bind `print-unreadable-function' to nil to avoid accidental > infinite recursion in the function called. */ > Lisp_Object func = Vprint_unreadable_function; > specbind (Qprint_unreadable_function, Qnil); > Lisp_Object result = CALLN (Ffuncall, func, obj, > escapeflag? Qt: Qnil); > > We need to switch back to the original buffer before that Ffuncall, but > we don't know what the original function was -- it's just stored in a > local variable in prin1(-to-string). I'm confused: "original function" or "original buffer"? The original buffer is given by current_buffer before you call the function which could change that, and the unwind_protect call should be before calling that function. But you already know all that, so I'm afraid I'm missing something here.