GNU bug report logs -
#29047
26.0.90; shr hang (regression from 25.3)
Previous Next
Reported by: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Date: Sat, 28 Oct 2017 23:59:01 UTC
Severity: normal
Found in version 26.0.90
Done: Katsumi Yamaoka <yamaoka <at> jpl.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Mike Kupfer <mkupfer <at> 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 " $")
This bug report was last modified 7 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.