bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27752: Custom mode-line face + smart eshell triggers interesting fre


From: Eli Zaretskii
Subject: bug#27752: Custom mode-line face + smart eshell triggers interesting freeze
Date: Tue, 18 Jul 2017 19:24:08 +0300

> Date: Tue, 18 Jul 2017 18:58:01 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 
> > From: Yegor Timoshenko <address@hidden>
> > Date: Tue, 18 Jul 2017 13:46:54 +0300
> > 
> > Emacs config required to reproduce this bug:
> > 
> > (custom-set-faces
> >  '(mode-line ((t (:box 1)))))
> > 
> > (require 'em-smart)
> > (add-hook 'eshell-mode-hook 'eshell-smart-initialize)
> > 
> > Instructions:
> > 
> > M-x eshell, M-x split-window-horizontally, type "find-file foo" in the 
> > eshell buffer and hit ENTER.
> > Emacs freezes, CPU consumption is around 100%.
> 
> This happens because Eshell abuses window-scroll-functions.  I'm
> working on a fix.

Should be fixed now.

eshell-smart-redisplay called pos-visible-in-window-p, which is not a
very "smart" thing to do from a function that runs in the middle of
redisplay: how can the caller expect to get a reliable result, if the
window is being scrolled, and no one yet knows what will be inside the
window when redisplay ends.  And there are other atrocities in
eshell-smart-redisplay.

Emacs now tries to protect itself against that, so that it won't
infloop.

Btw, I think this is the same bug as 26980, it's just that there I
never could have a reproducer.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]