GNU bug report logs - #29047
26.0.90; shr hang (regression from 25.3)

Previous Next

Package: emacs;

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


Message #14 received at 29047 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29047 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Subject: Re: bug#29047: 26.0.90; shr hang (regression from 25.3)
Date: Mon, 30 Oct 2017 15:21:17 +0900
[Message part 1 (text/plain, inline)]
On Sun, 29 Oct 2017 16:07:34 +0200, Eli Zaretskii wrote:
> 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.

Sorry, I did the 9eb028f change for fixing bug#24034:
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-07/msg01042.html>

> I can prevent the loop with the patch below.  I'm not sure this is the
> right fix, though.  Comments?

That's ok, but the properties necessary to copy there are only
`face' and `image-displayer'.  How about this one?

* lisp/net/shr.el (shr-fill-line): Copy only face and image-displayer
properties to gaps (bug#29047).

[Message part 2 (text/x-patch, inline)]
--- shr.el~	2017-10-29 22:05:08.139411500 +0000
+++ shr.el	2017-10-30 06:19:48.874402200 +0000
@@ -700,12 +700,16 @@
       ;; Success; continue.
       (when (= (preceding-char) ?\s)
 	(delete-char -1))
-      (let ((props (text-properties-at (point)))
+      (let ((props `(face ,(get-text-property (point) 'face)
+			  ;; Don't break the image-displayer property
+			  ;; as it will cause `gnus-article-show-images'
+			  ;; to show the two or more same images.
+			  image-displayer
+			  ,(get-text-property (point) 'image-displayer)))
 	    (gap-start (point)))
 	(insert "\n")
 	(shr-indent)
-	(when props
-	  (add-text-properties gap-start (point) props)))
+	(add-text-properties gap-start (point) props))
       (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.