From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74284 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Colour manipulation Date: Wed, 24 Nov 2010 14:45:04 +0900 Organization: Emacsen advocacy group Message-ID: References: <87pquvldcs.fsf@lifelogs.com> <87oc9yp21w.fsf@lifelogs.com> <87lj4pmgu7.fsf@keller.adm.naquadah.org> <87oc9ihjbk.fsf@keller.adm.naquadah.org> <8739quh5gk.fsf@keller.adm.naquadah.org> <87wro6fpgo.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1290577613 20735 80.91.229.12 (24 Nov 2010 05:46:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2010 05:46:53 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22649@lists.math.uh.edu Wed Nov 24 06:46: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 1PL8Bk-0000uC-LL for ding-account@gmane.org; Wed, 24 Nov 2010 06:46:40 +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 1PL8At-0005KM-Rd; Tue, 23 Nov 2010 23:45:47 -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 1PL8As-0005KB-9S for ding@lists.math.uh.edu; Tue, 23 Nov 2010 23:45:46 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PL8Am-0002Yc-Pf for ding@lists.math.uh.edu; Tue, 23 Nov 2010 23:45:45 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PL8Al-0007tV-00 for ; Wed, 24 Nov 2010 06:45:39 +0100 Original-Received: from localhost ([127.0.0.1]:53741) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1PL8AC-0003jW-3F for ding@gnus.org; Tue, 23 Nov 2010 23:45:04 -0600 X-Hashcash: 1:20:101124:ding@gnus.org::BoPnynj7oxE+hACB:00002xXA X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:qkBCM4ZghSlc4grlEeBfElJLMBk= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74284 Archived-At: Katsumi Yamaoka wrote: > I got the following error when rendering html articles by shr: Another error I got is: Debugger entered--Lisp error: (wrong-type-argument stringp nil) xw-color-values(nil nil) x-color-values(nil) rgb->normalize(nil) shr-color-visible("NavajoWhite" nil t) shr-color-check("rgb(19,") shr-insert-color-overlay("rgb(19, 19, 20)" 259 271) An html body that reproduces this is: --8<---------------cut here---------------start------------->8--- <#part type="text/html" disposition=inline> foo bar baz --8<---------------cut here---------------end--------------->8--- The causes are SPCs in rgb numbers. So, a workaround is: --8<---------------cut here---------------start------------->8--- --- shr.el~ 2010-11-24 00:31:48 +0000 +++ shr.el 2010-11-24 05:43:38 +0000 @@ -502,7 +502,8 @@ (defun shr-insert-color-overlay (color start end) (when color - (when (string-match " " color) + (when (and (not (string-match "\\`rgb([^\)]+)\\'" color)) + (string-match " " color)) (setq color (car (split-string color)))) (let ((overlay (make-overlay start end))) (overlay-put overlay 'face (cons 'foreground-color --8<---------------cut here---------------end--------------->8---