* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
@ 2018-05-01 6:08 Jonathan Kyle Mitchell
2018-05-01 12:21 ` Noam Postavsky
0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Kyle Mitchell @ 2018-05-01 6:08 UTC (permalink / raw)
To: 31326
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\x02\"\210\300\302\x02\"\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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-01 6:08 bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth Jonathan Kyle Mitchell
@ 2018-05-01 12:21 ` Noam Postavsky
2018-05-03 4:09 ` Jonathan Kyle Mitchell
0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2018-05-01 12:21 UTC (permalink / raw)
To: Jonathan Kyle Mitchell; +Cc: 31326
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
retitle 31326 eshell/clear goes into infinite loop with eshell-smart-initialize
found 31326 25
tags 31326 + confirmed
quit
Jonathan Kyle Mitchell <kyle@jonathanmitchell.org> writes:
> 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
This reproduces back to 25.3; it doesn't happen in 24.5, but "clear"
seems to do nothing in that version. I caught a backtrace (attached)
with M-x toggle-debug-on-quit and quickly hitting C-g.
[-- Attachment #2: backtrace from C-g --]
[-- Type: application/gzip, Size: 1012 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-01 12:21 ` Noam Postavsky
@ 2018-05-03 4:09 ` Jonathan Kyle Mitchell
2018-05-04 10:42 ` Noam Postavsky
0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Kyle Mitchell @ 2018-05-03 4:09 UTC (permalink / raw)
To: 31326, npostavs
On 05/01/2018 07:21 AM, Noam Postavsky wrote:
> retitle 31326 eshell/clear goes into infinite loop with eshell-smart-initialize
> found 31326 25
> tags 31326 + confirmed
> quit
>
> Jonathan Kyle Mitchell <kyle@jonathanmitchell.org> writes:
>
>> 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
> This reproduces back to 25.3; it doesn't happen in 24.5, but "clear"
> seems to do nothing in that version. I caught a backtrace (attached)
> with M-x toggle-debug-on-quit and quickly hitting C-g.
>
I did a little more investigation into this issue. While I don't fully
understand all the code paths of how it works, I found that let binding
eshell-input-filter-functions to nil stops the infinite looping.
Before issuing the clear command in eshell,
eshell-input-filter-functions contains this list:
(eshell-smart-display-setup eshell-add-to-history)
The original eshell/clear implementation just removes
eshell-add-to-history, so eshell-input-filter-functions is just this
list (which results in infinite looping):
(eshell-smart-display-setup)
Here's a diff for the change that works for me:
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index bbb74c3d86..9f854c7d90 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -884,8 +884,7 @@ eshell/clear
(interactive)
(if scrollback
(eshell/clear-scrollback)
- (let ((eshell-input-filter-functions
- (remq 'eshell-add-to-history eshell-input-filter-functions)))
+ (let ((eshell-input-filter-functions nil))
(insert (make-string (window-size) ?\n))
(eshell-send-input))))
--
Jonathan Kyle Mitchell
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-03 4:09 ` Jonathan Kyle Mitchell
@ 2018-05-04 10:42 ` Noam Postavsky
2018-05-04 18:07 ` Jonathan Kyle Mitchell
2018-07-11 1:30 ` Noam Postavsky
0 siblings, 2 replies; 9+ messages in thread
From: Noam Postavsky @ 2018-05-04 10:42 UTC (permalink / raw)
To: Jonathan Kyle Mitchell; +Cc: 31326
tags 31326 + patch
quit
Jonathan Kyle Mitchell <kyle@jonathanmitchell.org> writes:
> I did a little more investigation into this issue. While I don't fully
> understand all the code paths of how it works, I found that let
> binding eshell-input-filter-functions to nil stops the infinite
> looping.
> Here's a diff for the change that works for me:
> - (let ((eshell-input-filter-functions
> - (remq 'eshell-add-to-history eshell-input-filter-functions)))
> + (let ((eshell-input-filter-functions nil))
> (insert (make-string (window-size) ?\n))
> (eshell-send-input))))
Makes sense, I'll push this to master in a few days. Have you assigned
copyright for Emacs? If no, I'll mark it as a tiny change.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-04 10:42 ` Noam Postavsky
@ 2018-05-04 18:07 ` Jonathan Kyle Mitchell
2018-05-04 20:16 ` Eli Zaretskii
2018-07-11 1:30 ` Noam Postavsky
1 sibling, 1 reply; 9+ messages in thread
From: Jonathan Kyle Mitchell @ 2018-05-04 18:07 UTC (permalink / raw)
To: Noam Postavsky; +Cc: 31326
On 05/04/2018 05:42 AM, Noam Postavsky wrote:
> tags 31326 + patch
> quit
>
> Jonathan Kyle Mitchell <kyle@jonathanmitchell.org> writes:
>
>> I did a little more investigation into this issue. While I don't fully
>> understand all the code paths of how it works, I found that let
>> binding eshell-input-filter-functions to nil stops the infinite
>> looping.
>> Here's a diff for the change that works for me:
>> - (let ((eshell-input-filter-functions
>> - (remq 'eshell-add-to-history eshell-input-filter-functions)))
>> + (let ((eshell-input-filter-functions nil))
>> (insert (make-string (window-size) ?\n))
>> (eshell-send-input))))
> Makes sense, I'll push this to master in a few days. Have you assigned
> copyright for Emacs? If no, I'll mark it as a tiny change.
>
>
Thanks. No, I don't have any copyright papers signed. What's the process
for doing that?
--
Jonathan Kyle Mitchell
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-04 18:07 ` Jonathan Kyle Mitchell
@ 2018-05-04 20:16 ` Eli Zaretskii
2018-05-05 0:53 ` Jonathan Kyle Mitchell
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2018-05-04 20:16 UTC (permalink / raw)
To: Jonathan Kyle Mitchell; +Cc: 31326, npostavs
> From: Jonathan Kyle Mitchell <kyle@jonathanmitchell.org>
> Date: Fri, 4 May 2018 13:07:01 -0500
> Cc: 31326@debbugs.gnu.org
>
> No, I don't have any copyright papers signed. What's the process
> for doing that?
I can send you the instructions, if it's okay with you.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-04 20:16 ` Eli Zaretskii
@ 2018-05-05 0:53 ` Jonathan Kyle Mitchell
2018-05-05 6:40 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Kyle Mitchell @ 2018-05-05 0:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31326, Noam Postavsky
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
Yes, please do.
On Fri, May 4, 2018, 3:17 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Jonathan Kyle Mitchell <kyle@jonathanmitchell.org>
> > Date: Fri, 4 May 2018 13:07:01 -0500
> > Cc: 31326@debbugs.gnu.org
> >
> > No, I don't have any copyright papers signed. What's the process
> > for doing that?
>
> I can send you the instructions, if it's okay with you.
>
[-- Attachment #2: Type: text/html, Size: 824 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth
2018-05-04 10:42 ` Noam Postavsky
2018-05-04 18:07 ` Jonathan Kyle Mitchell
@ 2018-07-11 1:30 ` Noam Postavsky
1 sibling, 0 replies; 9+ messages in thread
From: Noam Postavsky @ 2018-07-11 1:30 UTC (permalink / raw)
To: Jonathan Kyle Mitchell; +Cc: 31326
tags 31326 fixed
close 31326 27.1
quit
Noam Postavsky <npostavs@gmail.com> writes:
> Makes sense, I'll push this to master in a few days.
A little late, but now pushed.
[1: 39489f782e]: 2018-07-10 21:22:52 -0400
Fix infinite recursion in eshell/clear (Bug#31326)
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=39489f782e436a490d1bec32d7ed9b7bcdacda24
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-07-11 1:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-01 6:08 bug#31326: 27.0.50; eshell/clear exceeds max-lisp-eval-depth Jonathan Kyle Mitchell
2018-05-01 12:21 ` Noam Postavsky
2018-05-03 4:09 ` Jonathan Kyle Mitchell
2018-05-04 10:42 ` Noam Postavsky
2018-05-04 18:07 ` Jonathan Kyle Mitchell
2018-05-04 20:16 ` Eli Zaretskii
2018-05-05 0:53 ` Jonathan Kyle Mitchell
2018-05-05 6:40 ` Eli Zaretskii
2018-07-11 1:30 ` Noam Postavsky
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.