From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55395: What does (1 2 3 . #2) mean? Date: Sat, 14 May 2022 09:45:15 -0400 Message-ID: References: <4B70C9BE-B784-4B74-A081-7A8B3F8D5136@acm.org> <87ilq931ay.fsf@gnus.org> <715F3D50-7D11-47CF-A34B-6532F1F508D7@acm.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28803"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 55395@debbugs.gnu.org, Lars Ingebrigtsen To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 14 15:46: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 1nps5z-00070D-4Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 May 2022 15:46:11 +0200 Original-Received: from localhost ([::1]:46766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nps5x-0002rM-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 May 2022 09:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nps5q-0002rC-T7 for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 09:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nps5q-0001mR-F5 for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 09:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nps5q-0007Kb-Au for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 09:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 May 2022 13:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55395 X-GNU-PR-Package: emacs Original-Received: via spool by 55395-submit@debbugs.gnu.org id=B55395.165253593628145 (code B ref 55395); Sat, 14 May 2022 13:46:02 +0000 Original-Received: (at 55395) by debbugs.gnu.org; 14 May 2022 13:45:36 +0000 Original-Received: from localhost ([127.0.0.1]:46031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nps5Q-0007Js-1M for submit@debbugs.gnu.org; Sat, 14 May 2022 09:45:36 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nps5O-0007JZ-4y for 55395@debbugs.gnu.org; Sat, 14 May 2022 09:45:34 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3BAD880065; Sat, 14 May 2022 09:45:28 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 96656802A7; Sat, 14 May 2022 09:45:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652535922; bh=5HYecQlFK+ohrzXZNHpqPPKcuPA0/Rylr2KceMMZ6Eo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=geEDekDqsUYREKX+xLfhXWAjVUryBT4EJYw9Rx5RhDmL77ANv8X1z74mzcI4Vkvan KV0lE+pjckvNLavXFqBfojoXztQ5OS+cz9o3MWFfmnN+FH2dEZXSL2taEPKZ69febf oQCYk8JzvCMDxTB+MUaj9KuPBOkUNP+UVzjwU5QW8suML9OwCiVGq3ldzlvtkdPwSf 4BCFnjNqkljt+ycz+BfQpjpMqaQecMjUZFdfkVkQaXKsQwBCZXfKSHCmZlflo79JBY SBinpdbYuuxssdn+c1ib5j4MMrVRCJ9+IbFQkR/ApTMrj+J0bn2fc+BFXJLZmfsOrV 1Nc7HzGAek4Eg== Original-Received: from alfajor (modemcable034.207-20-96.mc.videotron.ca [96.20.207.34]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 692D81208BF; Sat, 14 May 2022 09:45:22 -0400 (EDT) In-Reply-To: <715F3D50-7D11-47CF-A34B-6532F1F508D7@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 13 May 2022 22:01:44 +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:232238 Archived-At: >> The main goal is to avoid inf-looping and the #NNN chosen is >> somewhat arbitrary. > It seems to have sort-of worked before and was broken, inadvertently and > with the best intentions, by a later change. > > Additionally the #N value appears to be correct for other object types. For example, > > [a [b #1=[[c #1# d]]]] > > is printed as > > [a [b [[c #2 d]]]] > > which is consistent with the manual. I do have the impression that it used to be "correct", but I can't remember of a single time where I actually made use of that NNN. And even if you know what it means and it works correctly, it's pretty hard for a normal human to correctly count the depth starting from the root. I suspect if we want to "do better", printing "the beginning" of the object to which we're looping (and saying explicitly that there's a cycle) will be a lot more useful to the average user. [ Or we could even print "the period" rather than "the beginning". ] >> I'm personally more bothered by the fact that those #NNN use exactly the >> same syntax as used with `print-circle` yet they don't have the >> same semantics. > The syntax isn't exactly the same (#N vs #N= and #N#) but annoyingly close. Indeed, it's not as bad as I remembered. > For that matter I would have preferred numbering the other way, starting at > the bottom going up, like de Bruijn indices. I love&hate de Bruijn indices as much as the next guy, but they're not human-friendly (even more than the "like de Bruijn levels" we currently use). Stefan