From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Errors in redisplay in eww Date: Mon, 04 Jan 2016 21:09:40 +0200 Message-ID: <83vb795fgr.fsf@gnu.org> References: <83twn1dzg8.fsf@gnu.org> <874mf16xiy.fsf@gnus.org> <8360zhdtv9.fsf@gnu.org> <83io3fdipq.fsf@gnu.org> <838u48cr19.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1451934600 26926 80.91.229.3 (4 Jan 2016 19:10:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2016 19:10:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 04 20:09:55 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aGAVu-0002Dm-2f for ged-emacs-devel@m.gmane.org; Mon, 04 Jan 2016 20:09:54 +0100 Original-Received: from localhost ([::1]:46769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGAVo-0004zn-EN for ged-emacs-devel@m.gmane.org; Mon, 04 Jan 2016 14:09:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGAVh-0004zN-A3 for emacs-devel@gnu.org; Mon, 04 Jan 2016 14:09:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGAVd-0002U9-5i for emacs-devel@gnu.org; Mon, 04 Jan 2016 14:09:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGAVd-0002U5-27; Mon, 04 Jan 2016 14:09:37 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3330 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aGAVc-0001o1-Co; Mon, 04 Jan 2016 14:09:36 -0500 In-reply-to: (message from Lars Magne Ingebrigtsen on Sun, 03 Jan 2016 10:19:48 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197621 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sun, 03 Jan 2016 10:19:48 +0100 > > Eli Zaretskii 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