From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39550 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: Allow people to circumvent W3 for HTML Date: Sat, 20 Oct 2001 21:47:20 +1000 Organization: Not today, thank you, Mother. Sender: owner-ding@hpc.uh.edu Message-ID: <87669ay39a.fsf@inanna.rimspace.net> References: <878ze6hmsz.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 1035175245 28603 80.91.224.250 (21 Oct 2002 04:40:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:45 +0000 (UTC) Return-Path: Original-Received: (qmail 3856 invoked from network); 20 Oct 2001 11:48:21 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 20 Oct 2001 11:48:21 -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 15uubd-0005Ki-00; Sat, 20 Oct 2001 06:47:57 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Oct 2001 06:47:34 -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 GAA20720 for ; Sat, 20 Oct 2001 06:47:23 -0500 (CDT) Original-Received: (qmail 3847 invoked by alias); 20 Oct 2001 11:47:40 -0000 Original-Received: (qmail 3842 invoked from network); 20 Oct 2001 11:47:39 -0000 Original-Received: from melancholia.rimspace.net (HELO melancholia.danann.net) (210.23.138.19) by gnus.org with SMTP; 20 Oct 2001 11:47:39 -0000 Original-Received: from localhost (melancholia.rimspace.net [210.23.138.19]) by melancholia.danann.net (Postfix) with ESMTP id 247ED2A820 for ; Sat, 20 Oct 2001 21:47:23 +1000 (EST) Original-Received: by localhost (Postfix, from userid 1000) id 28E6E8219E; Sat, 20 Oct 2001 21:47:21 +1000 (EST) Original-To: ding@gnus.org In-Reply-To: (Simon Josefsson's message of "Sat, 20 Oct 2001 11:39:55 +0200") X-Homepage: http://danann.net/ Original-Lines: 72 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.5 (asparagus) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39550 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39550 On Sat, 20 Oct 2001, Simon Josefsson wrote: > Daniel Pittman writes: [...] >> Yes, please. Actually, allowing me to easily control what is used to >> render HTML to text would be ideal; I want to pipe it through (for >> example) html2text(1) rather than use W3. > > 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 will post my solution once it's written; it should be capable of doing that if someone with commit access wants to add it. It waits on my finishing cleaning my bedroom so I have somewhere to sleep tonight, though. :) > Hopefully Netscape won't cater to that line. It seems to be brighter than that, at least for versions of Netscape equal to Mozilla 0.9.5+. :) Daniel -- Time spent in the advertising business seems to create a permanent deformity like the Chinese habit of foot-bonding. -- Dean Acheson