Subject: Re: bug#29348: 26.0.50; shr.el heisenbug

From: Eli Zaretskii <[email-masked]>
Date: Sat, 25 Nov 2017 13:35:20 +0200

> From: Devon Sean McCullough <[email-masked]>
> Date: Sun, 19 Nov 2017 23:18:02 -0500
> Cc: [email-masked]
> 
> Downgrade from heisenbug to reproducible:

Thanks, this reproducible recipe helped a lot.

Your original patch didn't fix the problem for me, but the one below
does.  Please see if it fixes your problems.

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 4ba452e..ab7240c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -2289,8 +2289,10 @@ shr-render-td
 				  (<= (car (cdr attr)) width))
 			 (setq result (cdr attr)))))))
 	       result))
-	(let ((result (shr-render-td-1 dom width fill)))
+	(let* ((pt (point))
+               (result (shr-render-td-1 dom width fill)))
 	  (dom-set-attribute dom cache result)
+          (goto-char pt)
 	  result))))
 
 (defun shr-render-td-1 (dom width fill)