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#29047: 26.0.90; shr hang (regression from 25.3) Date: Sun, 29 Oct 2017 16:07:34 +0200 Message-ID: <8360ayujx5.fsf@gnu.org> References: <24901.1509235100@alto> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1509286095 17930 195.159.176.226 (29 Oct 2017 14:08:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2017 14:08:15 +0000 (UTC) Cc: 29047@debbugs.gnu.org To: Mike Kupfer , Katsumi Yamaoka , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 15:08:11 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 1e8oFv-0003Og-Sj for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 15:08:04 +0100 Original-Received: from localhost ([::1]:36619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8oG3-0000fK-A4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 10:08:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8oFx-0000fE-Md for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 10:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8oFu-0002DX-EU for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 10:08:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60287) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8oFu-0002DR-B2 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 10:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e8oFu-0003JW-5B for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 10:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2017 14:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29047-submit@debbugs.gnu.org id=B29047.150928606712718 (code B ref 29047); Sun, 29 Oct 2017 14:08:02 +0000 Original-Received: (at 29047) by debbugs.gnu.org; 29 Oct 2017 14:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:40735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8oFf-0003J4-GH for submit@debbugs.gnu.org; Sun, 29 Oct 2017 10:07:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8oFd-0003Iq-J9 for 29047@debbugs.gnu.org; Sun, 29 Oct 2017 10:07:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8oFV-00026r-BQ for 29047@debbugs.gnu.org; Sun, 29 Oct 2017 10:07:40 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8oFV-00026n-86; Sun, 29 Oct 2017 10:07:37 -0400 Original-Received: from [176.228.60.248] (port=2086 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e8oFU-0001MR-OL; Sun, 29 Oct 2017 10:07:37 -0400 In-reply-to: <24901.1509235100@alto> (message from Mike Kupfer on Sat, 28 Oct 2017 16:58:20 -0700) 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:139149 Archived-At: > From: Mike Kupfer > Date: Sat, 28 Oct 2017 16:58:20 -0700 > > Displaying the attached email with MH-E (using "emacs -Q") or Gnus leads > to a hang in shr (CPU is pegged, I waited for 5 minutes before giving > up). The HTML looks pretty gnarly, but Emacs 25.3 displays the message > just fine, with maybe a pause of a couple seconds. (Sending such a message as an inline HTML attachment to people most of whom can be assumed to use Emacs to read email, which will use shr, is not very friendly, okay?) Thanks, this bug was introduced by 9eb028f, and the problematic property is 'display' with value '(space :align-to (NNN))'. It causes shr-fill-line to infloop when this property is put on a newline. I can prevent the loop with the patch below. I'm not sure this is the right fix, though. Comments? diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c90d71d..067a3b9 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -704,8 +704,11 @@ shr-fill-line (gap-start (point))) (insert "\n") (shr-indent) - (when props - (add-text-properties gap-start (point) props))) + (while props + (let ((type (pop props)) + (value (pop props))) + (unless (eq type 'display) + (put-text-property gap-start (point) type value))))) (setq start (point)) (shr-vertical-motion shr-internal-width) (when (looking-at " $")