From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74769 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen 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:00:39 +0100 Organization: Programmerer Ingebrigtsen Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291651301 11013 80.91.229.12 (6 Dec 2010 16:01:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2010 16:01:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23125@lists.math.uh.edu Mon Dec 06 17:01:36 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 1PPdVI-00025G-1M for ding-account@gmane.org; Mon, 06 Dec 2010 17:01:28 +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 1PPdUs-0004z4-Gm; Mon, 06 Dec 2010 10:01:02 -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 1PPdUr-0004yl-9u for ding@lists.math.uh.edu; Mon, 06 Dec 2010 10:01:01 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PPdUm-0006b1-Sa for ding@lists.math.uh.edu; Mon, 06 Dec 2010 10:01:01 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PPdUm-0003Co-00 for ; Mon, 06 Dec 2010 17:00:56 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PPdUh-0001eB-FB for ding@gnus.org; Mon, 06 Dec 2010 17:00:51 +0100 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Dec 2010 17:00:51 +0100 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Dec 2010 17:00:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXX0L+ilYvGw74MBgfB vLWzrqh6Y1w+JCSm1CHsAAACDUlEQVQ4jXWST4+bMBDFzR6aa6yCc00t+gEiS+tzkJNcFzXAFSsw cy2isb9+x9hJs8n2WQI0P94b/2PjuZKPKo00FQ02Gim37FmyJGAWy5tkMhW3NAwbInijQYUF0oc8 3B3/RGVZfQbbm1OaA0U9GYjIEEWgeilH8MmSol7BbZmvPaJB/gwO+uHZ8eWsHsGD4+0G0gJLepb3 H8oFnE3SoTLyByedqwA6dZfmPJdNuQeeE/gVKj6SnKboeGFMXkfg/JxAaQQFmSIC7SzOydHmoV0C HgAwAC645Rw4pCjveL+AvWsdds53hwVo34uest5hPx1PgAOKBGDNss3si291i2hxsLtzBJazDBTw Vde4o+1g/JMctmCZUP5jtfdW2NbVRbOAd7TkmPV6dUSw2O38KUY5gILhRX+s2tyPgN6J6PA0cZxR s64tnLFor9fUw+UCFf5mlxY3he2G67VJYMxQY5+p1tZI7cHeoka20RPrFJ2FCAfCx+RYs5Xq2SUA +wC8nxgDxmbVAngSwAK0Rt/T7c+UbmHZfY3JAegInJQWGE/SR+BYhmtGLRQIpb/v6D0twDYHTkmX 6Ahgij1oImTYULaFCNxytB6IsD21peYRwBDATNPjTWir203oMatpaNh40rN3IOYEFk1jE+8VrVG9 gMcr2oR7BBRQEKjhLtrUZad43hBovtb/QH0D9TP4C45RDbE4j9scAAAAAElFTkSuQmCC Mail-Copies-To: never X-Now-Playing: Sandy Denny's _Complete Recordings 11 (Gold Dust: Live at the Royalty)_: "Take Me Away" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:mpfDXr30CwqvU8w2hZ1cdMWxoZY= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74769 Archived-At: Julien Danjou writes: > In that example yes. But with: > >

foo

bar

zot > > The result should be quite different. > > With the previous code, you would: > - Insert `foo' > - Insert `bar' > - Paint `bar' in red > - Insert zot > - Paint the backgruond for foobarzot in red. > > bar was invisible: red on red. The color checker had no clue that the > background was red. Are you sure? Since it inherited the background-color from the parent, it should have used it when it rendered the bar. So that you didn't get red-on-red. Let's see... yup: (when (and style (string-match "color" style)) (setq shr-stylesheet (nconc (shr-parse-style style) shr-stylesheet))) We add our stuff to what our parent(s) had... [...] (let ((color (cdr (assq 'color shr-stylesheet))) (background (cdr (assq 'background-color shr-stylesheet)))) (when (and shr-stylesheet (or color background)) (shr-colorize-region start (point) color background))))) ... and then use it. Should work, I think. Well, actually, it's rendering things too much -- it should have a (and (string-match "color" style)) in there, too, probably. -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen