From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61628 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Prevent nnrss from generating text/plain parts for HTML text Date: Wed, 04 Jan 2006 12:36:49 +0900 Message-ID: References: <87wthiedd8.fsf@stone.tss.usg.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136345887 31701 80.91.229.2 (4 Jan 2006 03:38:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 03:38:07 +0000 (UTC) Original-X-From: ding-owner+m10160=ding+2daccount=gmane.org@lists.math.uh.edu Wed Jan 04 04:38:04 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EtzTJ-0001wS-2V for ding-account@gmane.org; Wed, 04 Jan 2006 04:37:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EtzTI-0000bQ-00 for ding-account@gmane.org; Tue, 03 Jan 2006 21:37:56 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EtzSO-0000bI-00 for ding@lists.math.uh.edu; Tue, 03 Jan 2006 21:37:00 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EtzSJ-0008Dr-HC for ding@lists.math.uh.edu; Tue, 03 Jan 2006 21:37:00 -0600 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EtzSI-0003jM-00 for ; Wed, 04 Jan 2006 04:36:54 +0100 Original-Received: from softbank218118002045.bbtec.net ([218.118.2.45]:65295 helo=) by washington.hostforweb.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52) id 1EtzSU-0006Rf-K7 for ding@gnus.org; Tue, 03 Jan 2006 21:37:07 -0600 Original-To: ding@gnus.org 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.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:QoutURp2BFYF/17s/6HqfpE0tww= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.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: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61628 Archived-At: >>>>> In <87wthiedd8.fsf@stone.tss.usg.edu> >>>>> Mark Plaksin wrote: > nnrss would be better if it did not generate text/plain parts for items > that contain HTML. As-is, when you discourage HTML and an item contains > HTML you see the unrendered HTML first. K v will show you the HTML version > but it's extra keystrokes. > I use the this (from Katsumi :) to discourage HTML: > (setq gnus-buttonized-mime-types > '("multipart/alternative" "multipart/signed") > mm-discouraged-alternatives > '("text/html" "image/.*")) > Boing Boing's RSS items (from http://boingboing.net/index.xml) are always > HTML so I always have to hit K v to read them. > I don't know the best way to check for HTML in elisp. I've attached a > patch which uses a regexp to do the job. The patch works OK for me but I > don't think it's ideal. What's a better way to do this? How about making those variables group parameters? (eval-after-load "gnus-sum" '(setq gnus-newsgroup-variables (append '((gnus-buttonized-mime-types . '("multipart/alternative" "multipart/signed")) (mm-discouraged-alternatives . '("text/html" "image/.*"))) gnus-newsgroup-variables))) (add-to-list 'gnus-parameters '("\\`nnrss:" (gnus-buttonized-mime-types nil) (mm-discouraged-alternatives nil))) I haven't fully tested them yet, though.