From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27752: Custom mode-line face + smart eshell triggers interesting freeze Date: Tue, 18 Jul 2017 19:24:08 +0300 Message-ID: <8360epd87r.fsf@gnu.org> References: <5CA17C32-B990-47B3-ABF3-BA530C52E3D8@gmail.com> <837ez5d9fa.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1500395118 14724 195.159.176.226 (18 Jul 2017 16:25:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Jul 2017 16:25:18 +0000 (UTC) Cc: 27752@debbugs.gnu.org To: yegortimoshenko@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 18 18:25:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXVJA-0003OM-34 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jul 2017 18:25:12 +0200 Original-Received: from localhost ([::1]:57707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXVJE-0006IY-4B for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jul 2017 12:25:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXVJ3-0006FQ-Al for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 12:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXVJ0-00089L-5v for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 12:25:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXVJ0-00089A-1O for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 12:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dXVIz-0008Qd-Q3 for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 12:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jul 2017 16:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27752 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27752-submit@debbugs.gnu.org id=B27752.150039506132353 (code B ref 27752); Tue, 18 Jul 2017 16:25:01 +0000 Original-Received: (at 27752) by debbugs.gnu.org; 18 Jul 2017 16:24:21 +0000 Original-Received: from localhost ([127.0.0.1]:46863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXVIL-0008Pl-K3 for submit@debbugs.gnu.org; Tue, 18 Jul 2017 12:24:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXVIK-0008PZ-Rz for 27752@debbugs.gnu.org; Tue, 18 Jul 2017 12:24:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXVIC-0007Xs-GN for 27752@debbugs.gnu.org; Tue, 18 Jul 2017 12:24:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXVIC-0007XW-Cd; Tue, 18 Jul 2017 12:24:12 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dXVIB-000616-Ru; Tue, 18 Jul 2017 12:24:12 -0400 In-reply-to: <837ez5d9fa.fsf@gnu.org> (message from Eli Zaretskii on Tue, 18 Jul 2017 18:58:01 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134727 Archived-At: > Date: Tue, 18 Jul 2017 18:58:01 +0300 > From: Eli Zaretskii > Cc: 27752@debbugs.gnu.org > > > From: Yegor Timoshenko > > 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.