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#64835: =?UTF-8?Q?=E2=80=98describe-variable=E2=80=99?= unconditionally let-binds =?UTF-8?Q?=E2=80=98print-circle=E2=80=99?= to t Date: Mon, 24 Jul 2023 20:03:39 +0300 Message-ID: <83o7k1qm1g.fsf@gnu.org> References: <87zg3lmf1v.fsf@whxvd.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64835@debbugs.gnu.org To: Sebastian Miele , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 19:04:21 2023 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 1qNyyr-0006Gc-35 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 19:04:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNyyb-00050N-AP; Mon, 24 Jul 2023 13:04:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNyyY-00050C-Ea for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 13:04:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNyyY-0000sN-6J for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 13:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNyyY-0005gT-1a for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 13:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2023 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64835 X-GNU-PR-Package: emacs Original-Received: via spool by 64835-submit@debbugs.gnu.org id=B64835.169021819021788 (code B ref 64835); Mon, 24 Jul 2023 17:04:02 +0000 Original-Received: (at 64835) by debbugs.gnu.org; 24 Jul 2023 17:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:43913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNyxh-0005fK-Mz for submit@debbugs.gnu.org; Mon, 24 Jul 2023 13:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNyxc-0005ep-Vy for 64835@debbugs.gnu.org; Mon, 24 Jul 2023 13:03:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNyxV-0000ld-1L; Mon, 24 Jul 2023 13:02:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=XvU7wLjwNv5BtmYOJM3NjCpzL9LhHz4UEjZSo+Inyjk=; b=WI00UntndIAsP7MRCdCR ScVIRj39zb8TNa1Rmnt8DFcqfPyrY11pudvJ/5Ry/2HoPD8K2aTu6ih0YFWyhSgWJwBNt567JqvCo iitPrqrJ+mPHjjWs7/FLwOvavt8iQ/Vs9ZVg/JxpismANG9vNuut5VFDWRwTHziE0nMpZU0E3tCoL +XvPstwp0yGYz7F9XDnDVMwmp4OmIYOUVZFpBJU44vNaFcgtBn1tBLMYsYpYZYX90YWUi71plXop5 GG8b/DhSSStKPhJK0DWiJcnDVa2g1CPZdvPK0AcRQGxdmk+mm3NgPx/Ji0D1gZTfWp3+poGOF74XD YrM1gRN/RA0hrg==; Original-Received: from [87.69.77.57] (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 1qNyxU-000543-Bw; Mon, 24 Jul 2023 13:02:56 -0400 In-Reply-To: <87zg3lmf1v.fsf@whxvd.name> (message from Sebastian Miele on Mon, 24 Jul 2023 18:42:09 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265987 Archived-At: > From: Sebastian Miele > Date: Mon, 24 Jul 2023 18:42:09 +0200 > > That was not the case in Emacs 28. It seems to have been introduced > in the following commit: > > 2c18969c810f338d73beda592ee5af7103132e97 > Author: Stefan Monnier > AuthorDate: Thu Mar 2 02:08:08 2017 -0500 > Commit: Stefan Monnier > CommitDate: Thu Mar 2 02:08:32 2017 -0500 > > * lisp/help-fns.el (describe-variable): Use cl-print for the value > > Use `pp-buffer' rather than `pp' so as to avoid calling prin1 twice. > > 2017 is a while ago. The first pretest release of Emacs 28 was in > December 2021. So the commit must have entered the current emacs-29 > branch in some "non-linear" way. I don't think so. I see this code in Emacs 28.1. So I'm not sure why you didn't see this behavior in Emacs 28, if indeed it is caused by print-circle. > The problem is that the effect of ‘print-circle’ being t pertains to > all sharing, not just sharing that leads to circles. And that has the > effect, that the output can become arbitrarily unreadable. Consider > for example: > > (require 'ispell) > (ispell-set-spellchecker-params) > (describe-variable 'ispell-dictionary-alist) > > The display of the value in my machine contains, e.g., "(nil #1# #2# #3# > t #4# nil utf-8)". > > I do not see the reason for hard-coding ‘print-circle’ to t in > ‘describe-variable’. The only reason I can imagine would be the > prevention of infinite loops. But that cannot be the case, because > even with ‘print-circle’ nil, the printing routines seem to check for > circularity and handle it gracefully in the output. > > Is this a bug or a necessity that I do not understand, yet? > > The NEWS file does not mention this change. > > In general (and somewhat unrelated), it would be nice if ‘print-circle’ > would be split into two things: (1) make explicit all sharing (as is > done now), and (2) make explicit only a subset of sharing that resolves > all circles. (The latter would in at least two aspects still be > different from the graceful handling mentioned above when ‘print-circle’ > is nil.) Adding Stefan to the discussion.