From: Eli Zaretskii <eliz@gnu.org>
To: Mike Kupfer <mkupfer@alum.berkeley.edu>,
Katsumi Yamaoka <yamaoka@jpl.org>,
Lars Ingebrigtsen <larsi@gnus.org>
Cc: 29047@debbugs.gnu.org
Subject: bug#29047: 26.0.90; shr hang (regression from 25.3)
Date: Sun, 29 Oct 2017 16:07:34 +0200 [thread overview]
Message-ID: <8360ayujx5.fsf@gnu.org> (raw)
In-Reply-To: <24901.1509235100@alto> (message from Mike Kupfer on Sat, 28 Oct 2017 16:58:20 -0700)
> From: Mike Kupfer <mkupfer@alum.berkeley.edu>
> 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 " $")
next prev parent reply other threads:[~2017-10-29 14:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-28 23:58 bug#29047: 26.0.90; shr hang (regression from 25.3) Mike Kupfer
2017-10-29 14:07 ` Eli Zaretskii [this message]
2017-10-29 14:38 ` Mike Kupfer
2017-10-30 6:21 ` Katsumi Yamaoka
2017-10-30 18:54 ` Eli Zaretskii
2017-10-30 23:30 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8360ayujx5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=29047@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=mkupfer@alum.berkeley.edu \
--cc=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.