emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors in redisplay in eww


From: Eli Zaretskii
Subject: Re: Errors in redisplay in eww
Date: Mon, 04 Jan 2016 21:09:40 +0200

> From: Lars Magne Ingebrigtsen <address@hidden>
> Cc: address@hidden
> Date: Sun, 03 Jan 2016 10:19:48 +0100
> 
> Eli Zaretskii <address@hidden> writes:
> 
> >> > Hope you will be able to tell, or at least ask some questions that
> >> > will allow me to find that out.
> >> 
> >> Is the `variable-pitch' face valid for you?
> >
> > Yes, both before and after visiting that URL.
> 
> shr adds the colours (mostly) by using `add-face-text-property'.  Could
> there be a bug somewhere in that code?

No, add-face-text-property and shr-colorize-region are not the
culprit, at least they don't seem to be.  The problem is here:

              (dolist (line lines)
                (end-of-line)
                (let ((start (point)))
                  (insert
                   line
                   (propertize " "
                               'display `(space :align-to (,pixel-align))
                               'face (and (> (length line) 0)
                                          (shr-face-background
                                           (get-text-property
                                            (1- (length line)) 'face line)))
                               'shr-table-indent shr-table-id)
                   shr-table-vertical-line)
                  (shr-colorize-region
                   start (1- (point)) (nth 5 column) (nth 6 column)))
                (forward-line 1))

shr-face-background returns nil when get-text-property returns just
variable-pitch, so we get 'face nil' in the properties, and the rest
is history.

Can you tell how come get-text-property returns something else in your
case?  Where do the colors in the line's face come from?  If they come
from shr-colorize-region, then I never see any fg color but nil there,
and bg is almost always nil, except when it's (:background "#ffffff").

HTH




reply via email to

[Prev in Thread] Current Thread [Next in Thread]