From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86742 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?utf-8?Q?Sj=C3=B8gren?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Colouring ins and del tags? Date: Sat, 06 Feb 2016 21:57:35 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87vb61imkg.fsf@tullinup.koldfront.dk> References: <87zivdin3o.fsf@tullinup.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1454792289 22487 80.91.229.3 (6 Feb 2016 20:58:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2016 20:58:09 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34968@lists.math.uh.edu Sat Feb 06 21:57:57 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aS9vY-0004rc-Pb for ding-account@gmane.org; Sat, 06 Feb 2016 21:57:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aS9vP-0000xx-0B; Sat, 06 Feb 2016 14:57:47 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aS9vM-0000xP-T4 for ding@lists.math.uh.edu; Sat, 06 Feb 2016 14:57:44 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aS9vL-0006sN-TZ for ding@lists.math.uh.edu; Sat, 06 Feb 2016 14:57:44 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aS9vK-0004UV-Hn for ding@gnus.org; Sat, 06 Feb 2016 21:57:42 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aS9vI-0004YE-Oh for ding@gnus.org; Sat, 06 Feb 2016 21:57:40 +0100 Original-Received: from virgil.koldfront.dk ([2.110.51.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2016 21:57:40 +0100 Original-Received: from asjo by virgil.koldfront.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2016 21:57:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: virgil.koldfront.dk OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc Mail-Follow-Up-To: never X-Now-Playing: 4th time around, Blonde on Blonde (Bob Dylan) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86742 Archived-At: Adam writes: > How about colouring tags green and tags red in shr by default? Something like this, perhaps: (defun shr-tag-ins (cont) (let* ((start (point)) (color "green") (shr-stylesheet (nconc (list (cons 'color color)) shr-stylesheet))) (shr-generic cont) (shr-colorize-region start (point) color (cdr (assq 'background-color shr-stylesheet))))) (defun shr-tag-del (cont) (let* ((start (point)) (color "red") (shr-stylesheet (nconc (list (cons 'color color)) shr-stylesheet))) (shr-fontize-cont cont 'shr-strike-through) (shr-colorize-region start (point) color (cdr (assq 'background-color shr-stylesheet))))) Best regards, Adam -- "HENCE, I think that all UNIXs should have an EMACS, Adam Sjøgren and everybody should run UNIX!" asjo@koldfront.dk