From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/58934 Path: main.gmane.org!not-for-mail From: David Edmondson Newsgroups: gmane.emacs.gnus.general Subject: decoding more complex MIME messages Date: Mon, 18 Oct 2004 18:17:00 +0100 Organization: none Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098121180 15222 80.91.229.6 (18 Oct 2004 17:39:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2004 17:39:40 +0000 (UTC) Original-X-From: ding-owner+M7472@lists.math.uh.edu Mon Oct 18 19:39:24 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CJbNM-0005xv-00 for ; Mon, 18 Oct 2004 19:32:52 +0200 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 1CJbLF-0005zk-00; Mon, 18 Oct 2004 12:30:42 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CJbL8-0005ze-00 for ding@lists.math.uh.edu; Mon, 18 Oct 2004 12:30:34 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CJbL7-0001ov-17 for ding@lists.math.uh.edu; Mon, 18 Oct 2004 12:30:33 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id 2777A3A004B for ; Mon, 18 Oct 2004 12:30:31 -0500 (CDT) Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CJbL3-00034B-00 for ; Mon, 18 Oct 2004 19:30:29 +0200 Original-Received: from host217-37-28-201.in-addr.btopenworld.com ([217.37.28.201]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Oct 2004 19:30:29 +0200 Original-Received: from dme by host217-37-28-201.in-addr.btopenworld.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Oct 2004 19:30:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host217-37-28-201.in-addr.btopenworld.com User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (i386-pc-solaris2.10) Cancel-Lock: sha1:TTHvOeLFG/6hQ8Q5+S24hx7F2do= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:58934 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:58934 [ Gnus 5.10.6 on Emacs 21.3.1 ] I receive some mail messages[1] that have the following form: multipart/alternative { text/plain multipart/related { text/html image/jpeg image/jpeg ... } } My preference is to read the HTML version with inline embedded images. Unfortunately the code that searches for the images doesn't find them, as they are nested too deeply. As a result, I modified mm-w3m-cid-retrieve-1: (defun mm-w3m-cid-retrieve-1 (url handle) (dolist (elem handle) (when (listp elem) (if (equal url (mm-handle-id elem)) (progn (mm-insert-part elem) (throw 'found-handle (mm-handle-media-type elem)))) (if (equal "multipart" (mm-handle-media-supertype elem)) (mm-w3m-cid-retrieve-1 url elem))))) In essence, if one of the sub-parts of the element being examined is a multipart, we descend into the multipart to search. Could someone check this and, as appropriate, correct it, improve it or commit it? I've previously signed FSF papers for Gnus I believe, if that's relevant. Footnotes: [1] From newspipe: http://newspipe.sourceforge.net. dme.