From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39552 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Allow people to circumvent W3 for HTML Date: Sat, 20 Oct 2001 14:00:07 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <878ze6hmsz.fsf@inanna.rimspace.net> <87669ay39a.fsf@inanna.rimspace.net> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175247 28612 80.91.224.250 (21 Oct 2002 04:40:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:47 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 4029 invoked from network); 20 Oct 2001 12:01:57 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 20 Oct 2001 12:01:57 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15uup4-0005eo-00; Sat, 20 Oct 2001 07:01:50 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Oct 2001 07:01:28 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id HAA20896 for ; Sat, 20 Oct 2001 07:01:17 -0500 (CDT) Original-Received: (qmail 4025 invoked by alias); 20 Oct 2001 12:01:34 -0000 Original-Received: (qmail 4020 invoked from network); 20 Oct 2001 12:01:34 -0000 Original-Received: from unknown (HELO dolk.extundo.com) (195.42.214.242) by gnus.org with SMTP; 20 Oct 2001 12:01:34 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated bits=0) by dolk.extundo.com (8.12.1/8.12.1) with ESMTP id f9KC12HB016782; Sat, 20 Oct 2001 14:01:02 +0200 Original-To: Daniel Pittman In-Reply-To: <87669ay39a.fsf@inanna.rimspace.net> (Daniel Pittman's message of "Sat, 20 Oct 2001 21:47:20 +1000") Mail-Copies-To: nobody Original-Lines: 59 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39552 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39552 Daniel Pittman writes: >> Doesn't >> >> text/html: html2text %s; copiousoutput >> >> or something in ~/.mailcap work? > > Er, didn't last time I tried... ...time passes... > > ...or maybe not. I thought I did have it in there. Let me try again. > > No. Adding it and restarting XEmacs (and, thus, Gnus) completely failed > to cause to it take effect: the HTML mail still caused W3 to load. > > Lesse... Within `mailcap-mime-data', we have my values *first* in the > list, with the W3 values last. > > W3 is definitely chosen; there isn't an issue with searching this data > in reverse order, is there? More testing... > > Found it. The breakage comes for `mm-display-inline' > > Basically, `mm-display-part' comes in, makes sure the mailcap files are > parsed, locates the viewer from the mailcap data (getting html2text), > then asks: > > (if (and (mm-inlinable-p handle) > (mm-inlined-p handle)) > > When this passes, it calls `mm-display-inline' which unconditionally > uses W3. The HTML part isn't considered to be capable of being inlined > unless W3 is present. > > > Now, having looked at this, I can most certainly go and fix this problem > by redefining the stuff in the inlined type data structures to call my > shell command and parse the content that way. > > However, in answer to your original question: No, adding that to > .mailcap or *any* other mailcap file will never work when the W3 library > is installed. > > So, bug or feature? You decide ... but I would suggest adding a fairly > easy to reach default that let the end user call a shell command to > reformat the text and make it inline rather than forcing W3. I'd say bug, if you say something in .mailcap, Gnus should use that unless you've told it otherwise somewhere else or if there is a good reason to do something else. > I will post my solution once it's written; it should be capable of doing > that if someone with commit access wants to add it. IMHO even if nothing is specified in .mailcap, Gnus should use a customizable variable to say whether w3, w3m or some other Emacs web browsers should be used instead of hardcoding it to w3. So you should be able to override the text/html viewer used either by .mailcap or by changing the variable (the latter having more priority).