unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18012: 24.3; Can't print a huge list structure in IELM
@ 2014-07-14  7:11 sindikat
  2016-08-09  1:47 ` npostavs
  2021-09-04  8:40 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 6+ messages in thread
From: sindikat @ 2014-07-14  7:11 UTC (permalink / raw)
  To: 18012

I have a function that creates a nested list in the form (x (x (x (x
(...))))) arbitrarily deep:

(defun nestify (xs)
  (cl-reduce (lambda (x y) (if y (list x y) (list x))) xs :from-end t
  :initial-value nil))

In IELM when I try to call it on a sufficiently big list, it crashes
with an error:

ELISP> (nestify (number-sequence 1 1000))
*** IELM Error ***  Error during pretty-printing (bug in pp)

Googling the above error, including on Debbugs.gnu.org and site-only
search on gnu.org haven't revealed anything. zrgrep-ing showed the
string "Error during pretty-printing" is in function `ielm-eval-input`
in file `ielm.el`. Thus, I report this bug.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4)
 of 2013-09-27 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description:	LMDE Cinnamon Edition

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  shell-dirtrack-mode: t
  icomplete-mode: t
  global-hl-line-mode: t
  show-paren-mode: t
  ido-everywhere: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  delete-selection-mode: t
  recentf-mode: t
  ergoemacs-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
q SPC z z z SPC " a r s t " ) <return> ( p r i n c 
SPC z z z z <backspace> ) <return> <C-up> M-h ( p r 
i n c SPC M-H ) <return> <C-up> M-h ( p r i n c SPC 
M-H ) <return> ( s e t q SPC z z z <backspace> <backspace> 
<backspace> y y y SPC " a r s t " ) <return> ( s e 
t q SPC z z z z <backspace> SPC y y y ) <return> <C-up> 
M-l ' <return> ( p r i n c SPC z z z ) <return> <C-up> 
M-h M-y M-s M-r u d m e l i s p <return> M-r <f1> f 
f u n c a l l <return> M-r q <help-echo> <help-echo> 
<down-mouse-1> <mouse-2> <down-mouse-1> <mouse-1> SPC 
SPC SPC SPC SPC SPC SPC M-r i n t e r n M-h C-M-SPC 
<backspace> ( i n e r <backspace> <backspace> t e r 
n SPC 1 ) <return> <C-up> M-n <backspace> " a r s t 
" <return> <C-up> M-h M-H M-n M-s <backspace> y y y 
M-H <return> <C-up> M-h ( <backspace> ( M-H ) <return> 
<C-up> M-h M-y M-h M-i f u n c a l l SPC M-H <return> 
<down-mouse-1> <mouse-1> <next> <next> <next> SPC SPC 
M-r ( g e t SPC y y y ) <return> <C-up> M-n SPC y y 
y <return> M-r SPC SPC SPC SPC SPC SPC u u M-u M-u 
M-u M-u M-u M-u M-u M-u M-u M-u M-u M-u M-u <return> 
d m e l i s p <return> M-E M-a e m a c s - r e p <tab> 
M-SPC M-h <backspace> r e p o r t - e m <tab> <ret
urn>

Recent messages:
History item: 1
arstarst
History item: 1
arstarstarst
History item: 1
yyy
History item: 1
Type "q" in help window to restore its previous buffer.
Mark set
History item: 1 [5 times]

Load-path shadows:
~/.emacs.d/pymacs hides /home/sindikat/.emacs.d/elpa/pymacs-0.25/pymacs
/home/sindikat/.emacs.d/elpa/quack-20130126.1623/quack hides /usr/share/emacs24/site-lisp/emacs-goodies-el/quack
/home/sindikat/.emacs.d/elpa/color-theme-20080305.34/color-theme hides /usr/share/emacs24/site-lisp/emacs-goodies-el/color-theme
/home/sindikat/.emacs.d/elpa/markdown-mode-20131210.700/markdown-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/markdown-mode
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
~/.emacs.d/custom hides /usr/share/emacs/24.3/lisp/custom
/home/sindikat/.emacs.d/elpa/json-1.2/json hides /usr/share/emacs/24.3/lisp/json
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell
/home/sindikat/.emacs.d/elpa/ruby-mode-1.1/ruby-mode hides /usr/share/emacs/24.3/lisp/progmodes/ruby-mode
/home/sindikat/.emacs.d/elpa/org-20140707/org-pcomplete hides /usr/share/emacs/24.3/lisp/org/org-pcomplete
/home/sindikat/.emacs.d/elpa/org-20140707/ob-table hides /usr/share/emacs/24.3/lisp/org/ob-table
/home/sindikat/.emacs.d/elpa/org-20140707/ob-css hides /usr/share/emacs/24.3/lisp/org/ob-css
/home/sindikat/.emacs.d/elpa/org-20140707/ob-haskell hides /usr/share/emacs/24.3/lisp/org/ob-haskell
/home/sindikat/.emacs.d/elpa/org-20140707/org-indent hides /usr/share/emacs/24.3/lisp/org/org-indent
/home/sindikat/.emacs.d/elpa/org-20140707/org-agenda hides /usr/share/emacs/24.3/lisp/org/org-agenda
/home/sindikat/.emacs.d/elpa/org-20140707/ob-C hides /usr/share/emacs/24.3/lisp/org/ob-C
/home/sindikat/.emacs.d/elpa/org-20140707/org-docview hides /usr/share/emacs/24.3/lisp/org/org-docview
/home/sindikat/.emacs.d/elpa/org-20140707/org-timer hides /usr/share/emacs/24.3/lisp/org/org-timer
/home/sindikat/.emacs.d/elpa/org-20140707/ob-calc hides /usr/share/emacs/24.3/lisp/org/ob-calc
/home/sindikat/.emacs.d/elpa/org-20140707/ob-org hides /usr/share/emacs/24.3/lisp/org/ob-org
/home/sindikat/.emacs.d/elpa/org-20140707/ob-gnuplot hides /usr/share/emacs/24.3/lisp/org/ob-gnuplot
/home/sindikat/.emacs.d/elpa/org-20140707/org-info hides /usr/share/emacs/24.3/lisp/org/org-info
/home/sindikat/.emacs.d/elpa/org-20140707/ob-asymptote hides /usr/share/emacs/24.3/lisp/org/ob-asymptote
/home/sindikat/.emacs.d/elpa/org-20140707/ob-mscgen hides /usr/share/emacs/24.3/lisp/org/ob-mscgen
/home/sindikat/.emacs.d/elpa/org-20140707/org-mouse hides /usr/share/emacs/24.3/lisp/org/org-mouse
/home/sindikat/.emacs.d/elpa/org-20140707/org-inlinetask hides /usr/share/emacs/24.3/lisp/org/org-inlinetask
/home/sindikat/.emacs.d/elpa/org-20140707/ob-maxima hides /usr/share/emacs/24.3/lisp/org/ob-maxima
/home/sindikat/.emacs.d/elpa/org-20140707/org-w3m hides /usr/share/emacs/24.3/lisp/org/org-w3m
/home/sindikat/.emacs.d/elpa/org-20140707/ob-keys hides /usr/share/emacs/24.3/lisp/org/ob-keys
/home/sindikat/.emacs.d/elpa/org-20140707/ob-awk hides /usr/share/emacs/24.3/lisp/org/ob-awk
/home/sindikat/.emacs.d/elpa/org-20140707/ob-io hides /usr/share/emacs/24.3/lisp/org/ob-io
/home/sindikat/.emacs.d/elpa/org-20140707/ob-dot hides /usr/share/emacs/24.3/lisp/org/ob-dot
/home/sindikat/.emacs.d/elpa/org-20140707/org-mhe hides /usr/share/emacs/24.3/lisp/org/org-mhe
/home/sindikat/.emacs.d/elpa/org-20140707/ob-ditaa hides /usr/share/emacs/24.3/lisp/org/ob-ditaa
/home/sindikat/.emacs.d/elpa/org-20140707/org-src hides /usr/share/emacs/24.3/lisp/org/org-src
/home/sindikat/.emacs.d/elpa/org-20140707/ob-latex hides /usr/share/emacs/24.3/lisp/org/ob-latex
/home/sindikat/.emacs.d/elpa/org-20140707/org hides /usr/share/emacs/24.3/lisp/org/org
/home/sindikat/.emacs.d/elpa/org-20140707/ob-ruby hides /usr/share/emacs/24.3/lisp/org/ob-ruby
/home/sindikat/.emacs.d/elpa/org-20140707/org-irc hides /usr/share/emacs/24.3/lisp/org/org-irc
/home/sindikat/.emacs.d/elpa/org-20140707/org-protocol hides /usr/share/emacs/24.3/lisp/org/org-protocol
/home/sindikat/.emacs.d/elpa/org-20140707/org-feed hides /usr/share/emacs/24.3/lisp/org/org-feed
/home/sindikat/.emacs.d/elpa/org-20140707/org-rmail hides /usr/share/emacs/24.3/lisp/org/org-rmail
/home/sindikat/.emacs.d/elpa/org-20140707/ob-ref hides /usr/share/emacs/24.3/lisp/org/ob-ref
/home/sindikat/.emacs.d/elpa/org-20140707/ob hides /usr/share/emacs/24.3/lisp/org/ob
/home/sindikat/.emacs.d/elpa/org-20140707/org-crypt hides /usr/share/emacs/24.3/lisp/org/org-crypt
/home/sindikat/.emacs.d/elpa/org-20140707/ob-screen hides /usr/share/emacs/24.3/lisp/org/ob-screen
/home/sindikat/.emacs.d/elpa/org-20140707/org-compat hides /usr/share/emacs/24.3/lisp/org/org-compat
/home/sindikat/.emacs.d/elpa/org-20140707/org-gnus hides /usr/share/emacs/24.3/lisp/org/org-gnus
/home/sindikat/.emacs.d/elpa/org-20140707/ob-eval hides /usr/share/emacs/24.3/lisp/org/ob-eval
/home/sindikat/.emacs.d/elpa/org-20140707/ob-shen hides /usr/share/emacs/24.3/lisp/org/ob-shen
/home/sindikat/.emacs.d/elpa/org-20140707/ob-python hides /usr/share/emacs/24.3/lisp/org/ob-python
/home/sindikat/.emacs.d/elpa/org-20140707/org-entities hides /usr/share/emacs/24.3/lisp/org/org-entities
/home/sindikat/.emacs.d/elpa/org-20140707/org-faces hides /usr/share/emacs/24.3/lisp/org/org-faces
/home/sindikat/.emacs.d/elpa/org-20140707/ob-emacs-lisp hides /usr/share/emacs/24.3/lisp/org/ob-emacs-lisp
/home/sindikat/.emacs.d/elpa/org-20140707/ob-comint hides /usr/share/emacs/24.3/lisp/org/ob-comint
/home/sindikat/.emacs.d/elpa/org-20140707/ob-octave hides /usr/share/emacs/24.3/lisp/org/ob-octave
/home/sindikat/.emacs.d/elpa/org-20140707/org-clock hides /usr/share/emacs/24.3/lisp/org/org-clock
/home/sindikat/.emacs.d/elpa/org-20140707/org-ctags hides /usr/share/emacs/24.3/lisp/org/org-ctags
/home/sindikat/.emacs.d/elpa/org-20140707/ob-scheme hides /usr/share/emacs/24.3/lisp/org/ob-scheme
/home/sindikat/.emacs.d/elpa/org-20140707/ob-sqlite hides /usr/share/emacs/24.3/lisp/org/ob-sqlite
/home/sindikat/.emacs.d/elpa/org-20140707/org-table hides /usr/share/emacs/24.3/lisp/org/org-table
/home/sindikat/.emacs.d/elpa/org-20140707/ob-sql hides /usr/share/emacs/24.3/lisp/org/ob-sql
/home/sindikat/.emacs.d/elpa/org-20140707/org-datetree hides /usr/share/emacs/24.3/lisp/org/org-datetree
/home/sindikat/.emacs.d/elpa/org-20140707/org-list hides /usr/share/emacs/24.3/lisp/org/org-list
/home/sindikat/.emacs.d/elpa/org-20140707/ob-ledger hides /usr/share/emacs/24.3/lisp/org/ob-ledger
/home/sindikat/.emacs.d/elpa/org-20140707/org-bibtex hides /usr/share/emacs/24.3/lisp/org/org-bibtex
/home/sindikat/.emacs.d/elpa/org-20140707/org-bbdb hides /usr/share/emacs/24.3/lisp/org/org-bbdb
/home/sindikat/.emacs.d/elpa/org-20140707/ob-plantuml hides /usr/share/emacs/24.3/lisp/org/ob-plantuml
/home/sindikat/.emacs.d/elpa/org-20140707/ob-lisp hides /usr/share/emacs/24.3/lisp/org/ob-lisp
/home/sindikat/.emacs.d/elpa/org-20140707/ob-exp hides /usr/share/emacs/24.3/lisp/org/ob-exp
/home/sindikat/.emacs.d/elpa/org-20140707/ob-fortran hides /usr/share/emacs/24.3/lisp/org/ob-fortran
/home/sindikat/.emacs.d/elpa/org-20140707/ob-sass hides /usr/share/emacs/24.3/lisp/org/ob-sass
/home/sindikat/.emacs.d/elpa/org-20140707/org-footnote hides /usr/share/emacs/24.3/lisp/org/org-footnote
/home/sindikat/.emacs.d/elpa/org-20140707/org-attach hides /usr/share/emacs/24.3/lisp/org/org-attach
/home/sindikat/.emacs.d/elpa/org-20140707/org-element hides /usr/share/emacs/24.3/lisp/org/org-element
/home/sindikat/.emacs.d/elpa/org-20140707/ob-ocaml hides /usr/share/emacs/24.3/lisp/org/ob-ocaml
/home/sindikat/.emacs.d/elpa/org-20140707/ob-java hides /usr/share/emacs/24.3/lisp/org/ob-java
/home/sindikat/.emacs.d/elpa/org-20140707/org-macs hides /usr/share/emacs/24.3/lisp/org/org-macs
/home/sindikat/.emacs.d/elpa/org-20140707/org-mobile hides /usr/share/emacs/24.3/lisp/org/org-mobile
/home/sindikat/.emacs.d/elpa/org-20140707/org-install hides /usr/share/emacs/24.3/lisp/org/org-install
/home/sindikat/.emacs.d/elpa/org-20140707/ob-clojure hides /usr/share/emacs/24.3/lisp/org/ob-clojure
/home/sindikat/.emacs.d/elpa/org-20140707/org-eshell hides /usr/share/emacs/24.3/lisp/org/org-eshell
/home/sindikat/.emacs.d/elpa/org-20140707/ob-matlab hides /usr/share/emacs/24.3/lisp/org/ob-matlab
/home/sindikat/.emacs.d/elpa/org-20140707/org-habit hides /usr/share/emacs/24.3/lisp/org/org-habit
/home/sindikat/.emacs.d/elpa/org-20140707/ob-lob hides /usr/share/emacs/24.3/lisp/org/ob-lob
/home/sindikat/.emacs.d/elpa/org-20140707/ob-perl hides /usr/share/emacs/24.3/lisp/org/ob-perl
/home/sindikat/.emacs.d/elpa/org-20140707/org-id hides /usr/share/emacs/24.3/lisp/org/org-id
/home/sindikat/.emacs.d/elpa/org-20140707/org-archive hides /usr/share/emacs/24.3/lisp/org/org-archive
/home/sindikat/.emacs.d/elpa/org-20140707/org-version hides /usr/share/emacs/24.3/lisp/org/org-version
/home/sindikat/.emacs.d/elpa/org-20140707/ob-scala hides /usr/share/emacs/24.3/lisp/org/ob-scala
/home/sindikat/.emacs.d/elpa/org-20140707/org-plot hides /usr/share/emacs/24.3/lisp/org/org-plot
/home/sindikat/.emacs.d/elpa/org-20140707/org-capture hides /usr/share/emacs/24.3/lisp/org/org-capture
/home/sindikat/.emacs.d/elpa/org-20140707/ob-sh hides /usr/share/emacs/24.3/lisp/org/ob-sh
/home/sindikat/.emacs.d/elpa/org-20140707/ob-tangle hides /usr/share/emacs/24.3/lisp/org/ob-tangle
/home/sindikat/.emacs.d/elpa/org-20140707/ob-picolisp hides /usr/share/emacs/24.3/lisp/org/ob-picolisp
/home/sindikat/.emacs.d/elpa/org-20140707/ob-R hides /usr/share/emacs/24.3/lisp/org/ob-R
/home/sindikat/.emacs.d/elpa/org-20140707/ob-lilypond hides /usr/share/emacs/24.3/lisp/org/ob-lilypond
/home/sindikat/.emacs.d/elpa/org-20140707/ob-js hides /usr/share/emacs/24.3/lisp/org/ob-js
/home/sindikat/.emacs.d/elpa/org-20140707/org-colview hides /usr/share/emacs/24.3/lisp/org/org-colview
/home/sindikat/.emacs.d/elpa/org-20140707/org-loaddefs hides /usr/share/emacs/24.3/lisp/org/org-loaddefs
~/.emacs.d/secrets hides /usr/share/emacs/24.3/lisp/net/secrets

Features:
(shadow emacsbug misearch multi-isearch dired-aux parse-time sort
mule-util shr browse-url mm-archive mail-extr gnus-async gnus-bcklg
gnus-dup gnus-ml thingatpt org-element org-w3m org-wl org-vm org-rmail
org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp
org-exp-blocks org-info org-gnus org-docview doc-view image-mode
org-bibtex bibtex org-bbdb bookmark haskell-process
haskell-navigate-imports haskell-presentation-mode haskell-compile
haskell-str haskell-session haskell-indentation haskell-font-lock dired
inf-haskell haskell-cabal haskell-utils haskell-decl-scan imenu
haskell-mode haskell-string haskell-sort-imports haskell-align-imports
haskell-compat haskell-complete-module cl flymake dabbrev compile
jka-compr face-remap gnutls network-stream starttls tls pop3 nndraft
nnmh nnfolder nnml gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig
mailcap nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail
mail-source gnus-start gnus-spec gnus-int gnus-range message rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus gnus-ems nnheader view pcmpl-unix
shell debug ielm pp server eldoc icomplete hl-line paren ido ropemacs
pymacs keyfreq web-mode disp-table uniquify cl-macs gv org-id org-mobile
org-agenda org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-scheme geiser
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint comint ansi-color ring ob-core ob-eval org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
smtpmail auth-source gnus-util time-date password-cache sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils wombat-theme suspend
app f s dash ergoemacs-macros printing ps-print ps-def lpr
ergoemacs-menus delsel recentf tree-widget ergoemacs-mode two-column
ergoemacs-advices warnings cus-edit cus-start cus-load wid-edit
ergoemacs-extras ergoemacs-shortcuts ergoemacs-translate descr-text
help-mode ergoemacs-functions ergoemacs-modal ergoemacs-unbind
ergoemacs-themes advice help-fns cl-lib advice-preload
ergoemacs-theme-engine eieio-base eieio byte-opt bytecomp byte-compile
cconv ergoemacs-layouts undo-tree diff color-theme-autoloads
ergoemacs-mode-autoloads f-autoloads dash-autoloads geiser-autoloads
ghc-autoloads ghci-completion-autoloads haskell-mode-autoloads edmacro
kmacro helm-autoloads ht-autoloads jinja2-mode-autoloads json-autoloads
markdown-mode-autoloads monokai-theme-autoloads org-autoloads info
easymenu pymacs-autoloads quack-autoloads racket-mode-autoloads
request-autoloads rinari-autoloads jump-autoloads inflections-autoloads
findr-autoloads ruby-compilation-autoloads inf-ruby-autoloads
ruby-mode-autoloads s-autoloads sublime-themes-autoloads
ttl-mode-autoloads undo-tree-autoloads unidecode-autoloads finder-inf
web-mode-autoloads package emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18012: 24.3; Can't print a huge list structure in IELM
  2014-07-14  7:11 bug#18012: 24.3; Can't print a huge list structure in IELM sindikat
@ 2016-08-09  1:47 ` npostavs
  2018-04-12 13:32   ` Basil L. Contovounesios
  2021-09-04  8:40 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: npostavs @ 2016-08-09  1:47 UTC (permalink / raw)
  To: sindikat@mail36.net; +Cc: 18012

severity 18012 minor
quit

sindikat@mail36.net (sindikat@mail36.net) writes:

> I have a function that creates a nested list in the form (x (x (x (x
> (...))))) arbitrarily deep:
>
> (defun nestify (xs)
>   (cl-reduce (lambda (x y) (if y (list x y) (list x))) xs :from-end t
>   :initial-value nil))
>
> In IELM when I try to call it on a sufficiently big list, it crashes
> with an error:
>
> ELISP> (nestify (number-sequence 1 1000))
> *** IELM Error ***  Error during pretty-printing (bug in pp)

It seems that the circularity check when print-circle is nil stops at a
depth of 200.

(prin1 (nestify (number-sequence 1 200))) ;=> (error "Apparently circular structure being printed")

Setting print-circle to t makes this (and printing for ielm) work fine.
Maybe ielm should bind print-circle to t always?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18012: 24.3; Can't print a huge list structure in IELM
  2016-08-09  1:47 ` npostavs
@ 2018-04-12 13:32   ` Basil L. Contovounesios
  2018-04-12 13:44     ` Basil L. Contovounesios
  2018-04-12 14:21     ` Noam Postavsky
  0 siblings, 2 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2018-04-12 13:32 UTC (permalink / raw)
  To: npostavs; +Cc: sindikat@mail36.net, 18012

npostavs@users.sourceforge.net writes:

> sindikat@mail36.net (sindikat@mail36.net) writes:
>
>> I have a function that creates a nested list in the form (x (x (x (x
>> (...))))) arbitrarily deep:
>>
>> (defun nestify (xs)
>>   (cl-reduce (lambda (x y) (if y (list x y) (list x))) xs :from-end t
>>   :initial-value nil))
>>
>> In IELM when I try to call it on a sufficiently big list, it crashes
>> with an error:
>>
>> ELISP> (nestify (number-sequence 1 1000))
>> *** IELM Error ***  Error during pretty-printing (bug in pp)
>
> It seems that the circularity check when print-circle is nil stops at a
> depth of 200.
>
> (prin1 (nestify (number-sequence 1 200))) ;=> (error "Apparently circular
> structure being printed")
>
> Setting print-circle to t makes this (and printing for ielm) work fine.
> Maybe ielm should bind print-circle to t always?

I agree, given that ielm now uses cl-prin1:

81b5131e11: 2018-01-15 17:04:05 -0500
  * lisp/ielm.el (ielm-eval-input): Use cl-print.
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=81b5131e11fa96d32a1718c6e2ebf40994d7d281

and thus infloops in the following scenario:

1. emacs -Q
2. M-x emacs-version RET
     => GNU Emacs 27.0.50
        (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
        of 2018-04-08
3. M-x ielm RET
4. (let ((l (make-list 2 0)))
     (nconc l (cdr l)))
5. C-m
     => infloop
6. C-g
     => *** IELM Error ***  Quit during pretty-printing

This is in contrast to the *scratch* buffer, where C-j correctly inserts
the result of (4) as (0 0 . #1), presumably because pp is used instead
of cl-prin1.

Does this behaviour warrant a new bug?

-- 
Basil





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18012: 24.3; Can't print a huge list structure in IELM
  2018-04-12 13:32   ` Basil L. Contovounesios
@ 2018-04-12 13:44     ` Basil L. Contovounesios
  2018-04-12 14:21     ` Noam Postavsky
  1 sibling, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2018-04-12 13:44 UTC (permalink / raw)
  To: npostavs; +Cc: sindikat@mail36.net, 18012

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> 1. emacs -Q
> 2. M-x emacs-version RET
>      => GNU Emacs 27.0.50
>         (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>         of 2018-04-08
> 3. M-x ielm RET
> 4. (let ((l (make-list 2 0)))
>      (nconc l (cdr l)))
> 5. C-m
>      => infloop
> 6. C-g
>      => *** IELM Error ***  Quit during pretty-printing
>
> This is in contrast to the *scratch* buffer, where C-j correctly inserts
> the result of (4) as (0 0 . #1), presumably because pp is used instead
> of cl-prin1.
>
> Does this behaviour warrant a new bug?

I say "correctly", but I mean "without inflooping", as I am not sure
how, if at all, circular objects should be printed when print-circle is
nil.

Note that there is no infloop when printing a "top-level" circle, e.g.:

  (let ((l (list 0)))
    (nconc l l))

-- 
Basil





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18012: 24.3; Can't print a huge list structure in IELM
  2018-04-12 13:32   ` Basil L. Contovounesios
  2018-04-12 13:44     ` Basil L. Contovounesios
@ 2018-04-12 14:21     ` Noam Postavsky
  1 sibling, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2018-04-12 14:21 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: sindikat@mail36.net, 18012, npostavs

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

>>> ELISP> (nestify (number-sequence 1 1000))
>>> *** IELM Error ***  Error during pretty-printing (bug in pp)

>> (prin1 (nestify (number-sequence 1 200))) ;=> (error "Apparently circular
>> structure being printed")
>>
>> Setting print-circle to t makes this (and printing for ielm) work fine.
>> Maybe ielm should bind print-circle to t always?
>
> I agree, given that ielm now uses cl-prin1:

On the other hand, wouldn't it be confusing if ielm printing behaves
differently from normal printing?  Maybe all that needs to be fixed is
the ielm error message for this case, which seems fairly uninformative
at the moment.

> 1. emacs -Q
> 2. M-x emacs-version RET
>      => GNU Emacs 27.0.50
>         (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>         of 2018-04-08
> 3. M-x ielm RET
> 4. (let ((l (make-list 2 0)))
>      (nconc l (cdr l)))
> 5. C-m
>      => infloop
> 6. C-g
>      => *** IELM Error ***  Quit during pretty-printing

> Does this behaviour warrant a new bug?

Yes, I would say so (for cl-prin1 specifically).





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18012: 24.3; Can't print a huge list structure in IELM
  2014-07-14  7:11 bug#18012: 24.3; Can't print a huge list structure in IELM sindikat
  2016-08-09  1:47 ` npostavs
@ 2021-09-04  8:40 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-04  8:40 UTC (permalink / raw)
  To: sindikat; +Cc: 18012

sindikat@mail36.net (sindikat@mail36.net) writes:

> I have a function that creates a nested list in the form (x (x (x (x
> (...))))) arbitrarily deep:
>
> (defun nestify (xs)
>   (cl-reduce (lambda (x y) (if y (list x y) (list x))) xs :from-end t
>   :initial-value nil))
>
> In IELM when I try to call it on a sufficiently big list, it crashes
> with an error:
>
> ELISP> (nestify (number-sequence 1 1000))
> *** IELM Error ***  Error during pretty-printing (bug in pp)
>
> Googling the above error, including on Debbugs.gnu.org and site-only
> search on gnu.org haven't revealed anything. zrgrep-ing showed the
> string "Error during pretty-printing" is in function `ielm-eval-input`
> in file `ielm.el`. Thus, I report this bug.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

This has changed a bit since this was reported.  It now says:

ELISP> (nestify (number-sequence 1 1000))
*** IELM Error ***  Error during pretty-printing (bug in pp): (scan-error "Unbalanced parentheses" 1 385)

and a message in the echo area saying

cl-prin1: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’") [6 times]

I've now removed the confusing (and misleading) "(bug in pp)" from the
error message, and but the rest seems pretty much correct (when dealing
with things that Emacs can't print because of issues like this), so I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-04  8:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14  7:11 bug#18012: 24.3; Can't print a huge list structure in IELM sindikat
2016-08-09  1:47 ` npostavs
2018-04-12 13:32   ` Basil L. Contovounesios
2018-04-12 13:44     ` Basil L. Contovounesios
2018-04-12 14:21     ` Noam Postavsky
2021-09-04  8:40 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).