all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29047@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	Mike Kupfer <mkupfer@alum.berkeley.edu>
Subject: bug#29047: 26.0.90; shr hang (regression from 25.3)
Date: Mon, 30 Oct 2017 15:21:17 +0900	[thread overview]
Message-ID: <b4ma809i2aq.fsf@jpl.org> (raw)
In-Reply-To: <24901.1509235100@alto>

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

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).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 821 bytes --]

--- 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 " $")

  parent reply	other threads:[~2017-10-30  6:21 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
2017-10-29 14:38   ` Mike Kupfer
2017-10-30  6:21   ` Katsumi Yamaoka [this message]
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=b4ma809i2aq.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=29047@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=mkupfer@alum.berkeley.edu \
    /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.