From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25410 Path: main.gmane.org!not-for-mail From: Toby Speight Newsgroups: gmane.emacs.gnus.general Subject: Re: Adding MIME viewers Date: 27 Sep 1999 14:44:13 +0100 Organization: Citrix Systems (Cambridge) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035162800 13813 80.91.224.250 (21 Oct 2002 01:13:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:13:20 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA02694 for ; Mon, 27 Sep 1999 09:46:12 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id IAB24203; Mon, 27 Sep 1999 08:46:02 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 27 Sep 1999 08:46:29 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id IAA17404 for ; Mon, 27 Sep 1999 08:46:10 -0500 (CDT) Original-Received: from gatekeeper.ctxuk.citrix.com (root@gatekeeper.ctxuk.citrix.com [195.153.38.114]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA02671 for ; Mon, 27 Sep 1999 09:44:04 -0400 (EDT) Original-Received: from sh.ctxuk.citrix.com (sh.ctxuk.citrix.com [10.30.224.4]) by gatekeeper.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id OAA14819; Mon, 27 Sep 1999 14:43:59 +0100 (BST) Original-Received: from hwmail01.ctxuk.citrix.com (hwmail01.ctxuk.citrix.com [10.30.224.23]) by sh.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id OAA22358; Mon, 27 Sep 1999 14:43:58 +0100 (BST) Original-Received: from lanber.cam.citrix.com (LANBER [10.70.1.235]) by hwmail01.ctxuk.citrix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id T102T5SY; Mon, 27 Sep 1999 14:43:58 +0100 Original-To: The Gnus Mailing List Original-Lines: 31 In-Reply-To: Lars Magne Ingebrigtsen's message of "25 Sep 1999 10:59:41 +0200" X-Author-Info: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25410 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25410 Lars> Lars Magne Ingebrigtsen 0> In article , Lars wrote: Lars> Toby Speight writes: >> Has anyone written a good guide for writing viewers for MIME-types >> not built-in to Gnus? In particular, I've recently installed >> Stefan Monnier's diff-mode.el, and I'd like to use his font-lock >> rules to fontify "text/x-patch" bodyparts. Lars> I've now added the following section to the Emacs-MIME manual: Lars> Lars> New Viewers Lars> =========== Lars> Lars> Here's an example viewer for displaying `text/enriched' inline: Lars> Lars> (defun mm-display-enriched-inline (handle) Lars> (with-temp-buffer Lars> (mm-insert-part handle) Lars> (save-window-excursion Lars> (enriched-decode (point-min) (point-max)) Lars> (setq text (buffer-string)))) Lars> (mm-insert-inline handle text)) Thanks, Lars - that's exactly what I was looking for. Perhaps there should be a cross-ref to `inline-media-tests' and friends? BTW, shouldn't there be a (let (text) ...) around the example?