From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61631 Path: news.gmane.org!not-for-mail From: Mark Plaksin Newsgroups: gmane.emacs.gnus.general Subject: Re: Prevent nnrss from generating text/plain parts for HTML text Date: Wed, 04 Jan 2006 21:38:00 -0500 Message-ID: <87ek3n4cxj.fsf@stone.tss.usg.edu> 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 1136430378 13512 80.91.229.2 (5 Jan 2006 03:06:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 03:06:18 +0000 (UTC) Original-X-From: ding-owner+m10163@lists.math.uh.edu Thu Jan 05 04:06:12 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 1EuLOw-0005bs-2m for ding-account@gmane.org; Thu, 05 Jan 2006 04:02:55 +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 1EuLOl-0001yR-00; Wed, 04 Jan 2006 21:02:43 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EuLG3-0001yL-00 for ding@lists.math.uh.edu; Wed, 04 Jan 2006 20:53:43 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1EuLFw-0005SJ-En for ding@lists.math.uh.edu; Wed, 04 Jan 2006 20:53:43 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EuLFv-0006jC-00 for ; Thu, 05 Jan 2006 03:53:35 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EuL94-0001Hz-8R for ding@gnus.org; Thu, 05 Jan 2006 03:46:34 +0100 Original-Received: from stone.tss.usg.edu ([168.24.82.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Jan 2006 03:46:30 +0100 Original-Received: from happy by stone.tss.usg.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Jan 2006 03:46:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 45 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: stone.tss.usg.edu User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0 (gnu/linux) Cancel-Lock: sha1:XrxGWdgKsopRe7MYO3ZBvDmzMJA= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61631 Archived-At: Katsumi Yamaoka writes: >>>>>> 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. This works--thanks! I wonder whether there's any utility to having a text/plain part when reading RSS feeds. There must be but I can't quite imagine it!