Subject: bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth

From: Jonathan Kyle Mitchell <[email-masked]>
Date: Tue, 1 May 2018 01:08:20 -0500

The eshell/clear elisp function seems to go into an infinite loop before
ending in an error when the eshell smart display functionality is
enabled in eshell-mode-hook. Several "Error during redisplay" messages
are printed to *Messages* buffer.

Steps to reproduce:
1. ./emacs -Q
2. In the scratch buffer evaluate:
(require 'em-smart)
(add-hook 'eshell-mode-hook 'eshell-smart-initialize)
4. M-x eshell
5. type "clear" in eshell and press RET

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2018-04-29 built on jkmlaptop
Repository revision: bf12cc6c7830937b4c1a3df46294e74bea749a5f
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 18.04 LTS

Recent messages:
Error during redisplay: (eval (if (frame-parameter nil 'client) "@" "")) 
signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (eval (unless (display-graphic-p) "-%-")) 
signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (#[128 "\300\301\"\210\300\302\"\207" [apply 
redisplay--pre-redisplay-functions ignore nil] 4 nil nil] (#<window 3 on 
*eshell*>)) signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (mode-line-default-help-echo #<window 3 on 
*eshell*>) signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (eval (if (display-graphic-p) " " "-")) signaled 
(error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (eval (mode-line-eol-desc)) signaled (error 
"Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (eval (if (frame-parameter nil 'client) "@" "")) 
signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Error during redisplay: (eval (unless (display-graphic-p) "-%-")) 
signaled (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
redisplay--pre-redisplay-functions: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
Mark set
Quit
Configured using:
  'configure --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Eshell

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-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
   line-number-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils em-unix em-term term disp-table easymenu
ehelp em-script em-prompt em-ls cl-loaddefs cl-lib em-hist em-pred
em-glob em-dirs em-cmpl em-basic em-banner em-alias em-smart pcomplete
comint ansi-color ring esh-var esh-cmd esh-opt esh-io esh-ext esh-proc
esh-arg esh-groups eshell esh-module esh-util esh-mode time-date
elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 114325 13958)
  (symbols 48 21764 1)
  (miscs 40 58 128)
  (strings 32 33419 2014)
  (string-bytes 1 930621)
  (vectors 16 17832)
  (vector-slots 8 529981 21864)
  (floats 8 61 176)
  (intervals 56 1335 0)
  (buffers 992 12))

-- 
Jonathan Kyle Mitchell