GNU bug report logs -
#39805
describe-variable fails to print some circular list values
Previous Next
Reported by: No Wayman <iarchivedmywholelife <at> gmail.com>
Date: Wed, 26 Feb 2020 21:50:01 UTC
Severity: normal
Tags: confirmed, fixed, patch
Found in versions 28.0.50, 26.1
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #12 received at control <at> debbugs.gnu.org (full text, mbox):
# seems to be long standing
found 39805 25.3
tags 39805 + confirmed
quit
No Wayman <iarchivedmywholelife <at> gmail.com> 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)
This bug report was last modified 5 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.