From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#39805: 28.0.50; scan-sexps (scan_lists) incorrectly parsing circular list Date: Wed, 26 Feb 2020 20:38:12 -0500 Message-ID: <87pne0ajy3.fsf@gmail.com> References: <87wo89ghix.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="113893"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39805@debbugs.gnu.org To: No Wayman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 27 02:39:13 2020 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 1j788u-000TV0-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Feb 2020 02:39:12 +0100 Original-Received: from localhost ([::1]:52544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j788s-0000A0-S3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Feb 2020 20:39:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57487) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j788l-00009h-Kh for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2020 20:39:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j788k-0008OX-OS for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2020 20:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j788k-0008Mx-IT for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2020 20:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j788k-0007cr-D9 for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2020 20:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2020 01:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39805 X-GNU-PR-Package: emacs Original-Received: via spool by 39805-submit@debbugs.gnu.org id=B39805.158276750229249 (code B ref 39805); Thu, 27 Feb 2020 01:39:02 +0000 Original-Received: (at 39805) by debbugs.gnu.org; 27 Feb 2020 01:38:22 +0000 Original-Received: from localhost ([127.0.0.1]:57974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7885-0007ba-O0 for submit@debbugs.gnu.org; Wed, 26 Feb 2020 20:38:22 -0500 Original-Received: from mail-qk1-f177.google.com ([209.85.222.177]:36331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7883-0007bD-Q0; Wed, 26 Feb 2020 20:38:20 -0500 Original-Received: by mail-qk1-f177.google.com with SMTP id f3so1647983qkh.3; Wed, 26 Feb 2020 17:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fF7XefoD4fF6ylbvUIjI7VSJHbnpJyHDaqm0Uk+qqQQ=; b=NDhz5TQzzkGbZ7L1RRvw0/4xRf5M+Fh6w+k2I3vJ9jv57beDgM8nDAICKWVaCqh/6h tWZqk9zjEyeKhBX5ftix9fyLzdeQWW/pGB/phL5EONun05J/N3ve6h0nl+9ZYIT0+VOy 0FBRYqJAxXdpwaD9p+3vK37VUjJfsA+A2kWwRs2Rz9VpaXxuiZQ7li0jy2+SpW2g6d8b Maad5Sf+nQqIF5RMa26r0JduHgVNlilDEGdR9A57OXJWEHhj4+tfj0VAiklMR7xbYXAX yWWTnsLInfCLR/BApG1JX1jcvxUBpT2y//aGA4UxdKLJo/PPhCBKWlwNbY7G0Z83y7dQ StKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fF7XefoD4fF6ylbvUIjI7VSJHbnpJyHDaqm0Uk+qqQQ=; b=TEdD5rlXhD6hImg35igsqryH9IQvMr9qPJsDHDHhrB8beMZaM9niyNPLO+UNQpH8Na ATHz1DNMG7VEtlckC6JzArbqWrCE95d3uGOEhUezVT/NnIHUAPt3xiFQF3cwuU4yo2QP K+ax2bk899Nw/GIXd5E2JvNZoWBzxe3BVJqa04fh3lNmikn2IAUcHaesevVPXRd5AvRR RPGizpyB6pwqcykn5EVIwCFy4ieGlt2lxcIG+cFO/W875FW2/1qUKQ9TTCtMGRAliKCc 88jnnelixoQrEJhzW856bbkDV1ddCAXjaPUJ3ga5XEIxLqmLYUCRzVNA5/gRUrJP5w5b 9Hzg== X-Gm-Message-State: APjAAAX9x3g4eZzDWfEjOjnJEkdFXLVIwTcezkQSTsMo1WEPb5J380lr hH3z865lJ2gZFvozfCW7pKyiHb6kRaw= X-Google-Smtp-Source: APXvYqwzRfO1J1gif6nRc0SrXxVkiTElRsUmfJujveyyrU7v0PXYPUhNB7dNX/2y0a/tXoTEPFpaKQ== X-Received: by 2002:a37:9b45:: with SMTP id d66mr2501481qke.84.1582767494106; Wed, 26 Feb 2020 17:38:14 -0800 (PST) Original-Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id t29sm2278770qtt.20.2020.02.26.17.38.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 17:38:13 -0800 (PST) In-Reply-To: <87wo89ghix.fsf@gmail.com> (No Wayman's message of "Wed, 26 Feb 2020 16:33:59 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:176523 Archived-At: # seems to be long standing found 39805 25.3 tags 39805 + confirmed quit No Wayman writes: > While developing a package that utilizes circular lists, I ran > into a bug when trying to describe-variable > a variable that contains circular lists. I've hewed it down to the > following: > > ** Minimal Reproducible Case > > #+begin_src emacs-lisp :results raw h replace > (condition-case-unless-debug err > (with-temp-buffer > (insert "(#9=() :key val)") > (pp-buffer) > nil) It doesn't fail if the buffer is changed to emacs-lisp-mode before the pp-buffer call. I guess scan-sexps doesn't handle the #N= correctly unless the syntax-table has been set for emacs-lisp. I note that pp-to-string does some setup on its temp buffer, so maybe describe-variable needs to do that too. For the record, to reproduce the error from describe-variable, a slightly less minimal example is needed (because the value must be more than 68 characters long to trigger pretty printing) (setq vv '(#1=(a b) :key val #1# :key val :key val :key val :key val)) (describe-variable 'vv)