From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74777 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.gnus.general Subject: Re: [gnus git] branch master updated: =2= shr: colorize only in one place ; shr: shr-colorize-region fix and stylesheet color retrieval fix Date: Mon, 06 Dec 2010 17:33:33 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1291653228 21658 80.91.229.12 (6 Dec 2010 16:33:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2010 16:33:48 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23133@lists.math.uh.edu Mon Dec 06 17:33:43 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PPe0Q-0002uu-AP for ding-account@gmane.org; Mon, 06 Dec 2010 17:33:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PPe0P-0005NO-Cn; Mon, 06 Dec 2010 10:33:37 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PPe0O-0005NF-Bw for ding@lists.math.uh.edu; Mon, 06 Dec 2010 10:33:36 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PPe0N-0006oD-9r for ding@lists.math.uh.edu; Mon, 06 Dec 2010 10:33:36 -0600 Original-Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PPe0M-0003fm-00 for ; Mon, 06 Dec 2010 17:33:34 +0100 Original-Received: from cigue.easter-eggs.fr (cigue.easter-eggs.fr [10.0.0.33]) by rose.easter-eggs.fr (Postfix) with ESMTPS id 713BF14035 for ; Mon, 6 Dec 2010 17:33:30 +0100 (CET) Original-Received: from jdanjou by cigue.easter-eggs.fr with local (Exim 4.72) (envelope-from ) id 1PPe0M-0003kq-84 for ding@gnus.org; Mon, 06 Dec 2010 17:33:34 +0100 Mail-Followup-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 06 Dec 2010 17:22:49 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74777 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Dec 06 2010, Lars Magne Ingebrigtsen wrote: > It adds all the stuff from style=3D"" to the (inherited) style sheet, so > if background-color is present, it's inherited. Yes, but you are forgetting about tag attributes like 'bgcolor': ^^^^ this one was NOT added to shr-stylesheet, that's what I am talking about. :) > If any parent had color/background-color, then shr-colorize-region will > be called with those colours. That's the optimisation problem: > > (let ((color (cdr (assq 'color shr-stylesheet))) > (background (cdr (assq 'background-color > shr-stylesheet)))) > > shr-stylesheet here isn't the style=3D"" from the current tag, but the > inherited one (that includes the current tag, at this point). I understand, but somehow you have to give the parent's background color so if a children as a foreground color it can check the color. One thing what still does not work correctly though:
Foo la la la
dwq Bar
Zot
"dwq" will not be in red. That's because I think we are not calling shr-colorize at the right place. =2D-=20 Julien Danjou // =E1=90=B0 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkz9EF4ACgkQpGK1HsL+5c1lugCeNbyxKUCmB3kKXRjCTO15cVAt ap4AoKAyK4c/XtioGmCc4Aa1pn6BROD3 =X4Ts -----END PGP SIGNATURE----- --=-=-=--