From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26071 Path: main.gmane.org!not-for-mail From: dsg@mitre.org (David S. Goldberg) Newsgroups: gmane.emacs.gnus.general Subject: mm-inline-override-types Date: 29 Oct 1999 14:36:33 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035163348 17483 80.91.224.250 (21 Oct 2002 01:22:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:22:28 +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 OAA13471 for ; Fri, 29 Oct 1999 14:38:05 -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 NAB28203; Fri, 29 Oct 1999 13:37:53 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 29 Oct 1999 13:37:26 -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 NAA17117 for ; Fri, 29 Oct 1999 13:37:11 -0500 (CDT) Original-Received: from linus.mitre.org (linus.mitre.org [129.83.10.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA13458 for ; Fri, 29 Oct 1999 14:36:35 -0400 (EDT) Original-Received: from blackbird.mitre.org (blackbird [129.83.65.14]) by linus.mitre.org (8.8.7/8.8.7) with ESMTP id OAA17621 for ; Fri, 29 Oct 1999 14:36:34 -0400 (EDT) Original-Received: (from dsg@localhost) by blackbird.mitre.org (8.8.7/8.8.7) id OAA13785; Fri, 29 Oct 1999 14:36:33 -0400 (EDT) Mail-Copies-To: never Original-To: The Gnus Mailing List X-Face: GUaHTH@nS>[7,ME@-gYZ4#Wl{z"99k@[[Y8AcP0x1paqu.,z9,XSV1WI>{q3f6^e5(zrit <4fV&VHhmE`uidRqtmG27;si9&r;#KSF~E#$%W8w(xdp)H4tW=\2XOk~3=@oGqqpj;m4xf Ow;y26396&,34@9#~4;@*S;E0cq"LM9N(us4P%F(Nxis'Vvfm9?KufH;:Q$dMa-QWGLR&K d0`LJZE8xb*>^yN>b]_NcU:E=Zn\1=#/(OS2 Original-Lines: 21 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) XEmacs/21.1 (Biscayne) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:26071 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:26071 --=-=-= A week or so ago I posted patches adding support for specifying MIME types that are contained in mm-inlined-types by virtue of regexp (e.g. text/.* includes text/html) but the user prefers to have treated as attachment. Those patches were broken. I did not do sufficient testing. The ones I attach here appear to be working as intended now. -- Dave Goldberg Post: The Mitre Corporation\MS B325\202 Burlington Rd.\Bedford, MA 01730 Phone: 781-271-3887 Email: dsg@mitre.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=ChangeLog.patch diff -u /afs/rcf/user/dsg/elisp/gnus/lisp/ChangeLog.0.97 /afs/rcf/user/dsg/elisp/gnus/lisp/ChangeLog --- /afs/rcf/user/dsg/elisp/gnus/lisp/ChangeLog.0.97 Fri Oct 29 10:46:35 1999 +++ /afs/rcf/user/dsg/elisp/gnus/lisp/ChangeLog Fri Oct 29 10:46:35 1999 @@ -1,3 +1,11 @@ +1999-10-20 David S. Goldberg + + * mm-decode.el mm-inline-override-types: New variable + + * mm-decode.el (mm-inline-override-p): New function + + * mm-decode.el (mm-inlined-p): Use it + Mon Sep 27 15:18:05 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.97 is released. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=texi.ChangeLog.patch diff -u /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/ChangeLog.0.97 /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/ChangeLog --- /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/ChangeLog.0.97 Fri Oct 29 14:03:16 1999 +++ /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/ChangeLog Fri Oct 29 14:03:16 1999 @@ -1,3 +1,7 @@ +1999-10-29 David S. Goldberg + + * emacs-mime.texi (Customization): Document mm-inline-override-types + 1999-09-25 10:58:17 Lars Magne Ingebrigtsen * message.texi (Forwarding): Updated. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-art.el.patch diff -u /afs/rcf/user/dsg/elisp/gnus/lisp/gnus-art.el.0.97 /afs/rcf/user/dsg/elisp/gnus/lisp/gnus-art.el --- /afs/rcf/user/dsg/elisp/gnus/lisp/gnus-art.el.0.97 Fri Oct 29 13:39:41 1999 +++ /afs/rcf/user/dsg/elisp/gnus/lisp/gnus-art.el Fri Oct 29 13:39:41 1999 @@ -3129,10 +3129,11 @@ (when (string-match (pop ignored) type) (throw 'ignored nil))) (if (and (setq not-attachment - (or (not (mm-handle-disposition handle)) - (equal (car (mm-handle-disposition handle)) - "inline") - (mm-attachment-override-p handle))) + (and (not (mm-inline-override-p handle)) + (or (not (mm-handle-disposition handle)) + (equal (car (mm-handle-disposition handle)) + "inline") + (mm-attachment-override-p handle)))) (mm-automatic-display-p handle) (or (mm-inlined-p handle) (mm-automatic-external-display-p type))) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=mm-decode.el.patch diff -u /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el.0.97 /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el --- /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el.0.97 Fri Oct 29 10:51:27 1999 +++ /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el Fri Oct 29 10:51:27 1999 @@ -142,6 +142,9 @@ (defvar mm-attachment-override-types '("text/plain" "text/x-vcard") "Types that should have \"attachment\" ignored if they can be displayed inline.") +(defvar mm-inline-override-types nil + "Types that should be treated as attachments even if they can be displayed inline.") + (defvar mm-automatic-external-display nil "List of MIME type regexps that will be displayed externally automatically.") @@ -476,7 +479,8 @@ (type (mm-handle-media-type handle)) method result) (while (setq method (pop methods)) - (when (and (string-match method type) + (when (and (not (mm-inline-override-p handle)) + (string-match method type) (mm-inlinable-p handle)) (setq result t methods nil))) @@ -491,6 +495,16 @@ (while (setq ty (pop types)) (when (and (string-match ty type) (mm-inlinable-p handle)) + (throw 'found t)))))) + +(defun mm-inline-override-p (handle) + "Say whether HANDLE should have inline behavior overridden." + (let ((types mm-inline-override-types) + (type (mm-handle-media-type handle)) + ty) + (catch 'found + (while (setq ty (pop types)) + (when (string-match ty type) (throw 'found t)))))) (defun mm-automatic-external-display-p (type) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=emacs-mime.texi.patch diff -u /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/emacs-mime.texi.0.97 /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/emacs-mime.texi --- /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/emacs-mime.texi.0.97 Fri Oct 29 14:00:48 1999 +++ /afs/rcf/user/dsg/elisp/gnus/pgnus/texi/emacs-mime.texi Fri Oct 29 14:00:48 1999 @@ -899,6 +899,14 @@ makes the library display all inline images as inline, regardless of their size. +@item mm-inline-override-p +@code{mm-inlined-types} may include regular expressions, for example to +specify that all @samp{text/.*} parts be displayed inline. If a user +prefers to have a type that matches such a regular expression be treated +as an attachment, that can be accomplished by setting this variable to a +list containing that type. For example assuming @code{mm-inlined-types} +includes @samp{text/.*}, then including @samp{text/html} in this +variable will cause @samp{text/html} parts to be treated as attachments. @end table --=-=-=--