Gnus development mailing list
 help / color / mirror / Atom feed
* first MIME part not displayed
@ 2001-07-07  4:06 Paul Jarc
  2001-07-07 18:35 ` Raymond Scholz
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Paul Jarc @ 2001-07-07  4:06 UTC (permalink / raw)


I wrote a message using Oort as of 2001-06-27, attaching a patch file
to the message.  It looks like it was encoded ok, but that Gnus as
well as a checkout from just now both display the message without the
first MIME part (where the actual text of the message is).  The
message is here: <URL:http://multivac.cwru.edu./prj/attach-message>
and Gnus displays it like this:

From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: [bgware] cvm-unix details
To: bgware@lists.em.ca
Date: Fri, 06 Jul 2001 13:46:10 -0400
Mail-Followup-To: bgware@lists.em.ca

[1. text/x-patch; cvm-unix.c.patch]...

---------------------------------------------------------------------
To unsubscribe, e-mail: bgware-unsubscribe@lists.em.ca
For additional commands, e-mail: bgware-help@lists.em.ca


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-07  4:06 first MIME part not displayed Paul Jarc
@ 2001-07-07 18:35 ` Raymond Scholz
  2001-07-09 20:22   ` Colin Walters
  2001-07-11 19:33 ` Colin Walters
  2001-07-12 17:13 ` ShengHuo ZHU
  2 siblings, 1 reply; 10+ messages in thread
From: Raymond Scholz @ 2001-07-07 18:35 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> I wrote a message using Oort as of 2001-06-27, attaching a patch file
> to the message.  It looks like it was encoded ok, but that Gnus as
> well as a checkout from just now both display the message without the
> first MIME part (where the actual text of the message is).  The
> message is here: <URL:http://multivac.cwru.edu./prj/attach-message>
> and Gnus displays it like this:

Ah, maybe this is related to the error I get since yesterday's cvs up
when displaying a message with

,----
| Mime-Version: 1.0
| Content-Type: image/gif
| Content-Disposition: inline; filename=di-010703.gif
| Content-Transfer-Encoding: base64
`----

Signaling: (void-function put-image)
  put-image(nil #<marker at 1784 in *Article*>)
  mm-inline-image((#<buffer  *mm*> ("image/gif") base64 nil ("inline" (filename . "di-010707.gif")) nil nil nil))
  mm-display-inline((#<buffer  *mm*> ("image/gif") base64 nil ("inline" (filename . "di-010707.gif")) nil nil nil))
  mm-display-part((#<buffer  *mm*> ("image/gif") base64 nil ("inline" (filename . "di-010707.gif")) nil nil nil) t)
  byte-code("\bƒ\x17
  gnus-mime-display-single((#<buffer  *mm*> ("image/gif") base64 nil ("inline" (filename . "di-010707.gif")) nil nil nil))
  gnus-mime-display-part((#<buffer  *mm*> ("image/gif") base64 nil ("inline" (filename . "di-010707.gif")) nil nil nil))
  gnus-display-mime()
  gnus-article-prepare-display()
  gnus-article-prepare(4614 nil)
  gnus-summary-display-article(4614 nil)
  gnus-summary-select-article(nil nil pseudo)
  gnus-summary-scroll-up(1)
  call-interactively(gnus-summary-scroll-up)

I suppose `put-image' is XEmacs (and Emacs 21) specific.  I have Emacs
20.7

Cheers, Ray
-- 
Sigmentation fault, core dumped.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-07 18:35 ` Raymond Scholz
@ 2001-07-09 20:22   ` Colin Walters
  2001-07-09 20:56     ` Colin Walters
  0 siblings, 1 reply; 10+ messages in thread
From: Colin Walters @ 2001-07-09 20:22 UTC (permalink / raw)


Raymond Scholz <ray-2001@zonix.de> writes:

> Signaling: (void-function put-image)

Yeah, this is my fault, I think.  Patch in the works.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-09 20:22   ` Colin Walters
@ 2001-07-09 20:56     ` Colin Walters
  2001-07-10  0:06       ` ShengHuo ZHU
  2001-07-11 16:05       ` Paul Jarc
  0 siblings, 2 replies; 10+ messages in thread
From: Colin Walters @ 2001-07-09 20:56 UTC (permalink / raw)


Colin Walters <walters@cis.ohio-state.edu> writes:

> Yeah, this is my fault, I think.  Patch in the works.

Ok, this should fix the problems, I hope.  I think it's better anyways
than the previous patch, because now we leave the choice of
"defaulting" to text/plain up to the user, by putting it in
`mm-inline-media-tests'.

2001-07-09  Colin Walters  <walters@cis.ohio-state.edu>

	* mm-decode.el (mm-inline-media-tests): Default to displaying as
	text/plain if the type doesn't match any other media types.
	(mm-inlined-types): Doc fix.
	(mm-display-inline): Revert previous change (now handled by a
	default type in `mm-inline-media-tests'.
	(mm-inlinable-p): Revive.
	(mm-display-part): Call `mm-inlinable-p'.
	(mm-attachment-override-p): Ditto.
	(mm-inlined-p): Doc fix.
	
	* gnus-art.el (gnus-mime-display-single): Call `mm-inlinable-p' as
	well as `mm-inlined-p'.

--- gnus-art.el.~6.86.~	Mon Jul  9 14:57:41 2001
+++ gnus-art.el	Mon Jul  9 16:51:04 2001
@@ -3869,7 +3869,9 @@
 				       "inline")
 				(mm-attachment-override-p handle))))
 		 (mm-automatic-display-p handle)
-		 (or (mm-inlined-p handle)
+		 (or (and
+		      (mm-inlinable-p handle)
+		      (mm-inlined-p handle))
 		     (mm-automatic-external-display-p type)))
 	    (setq display t)
 	  (when (equal (mm-handle-media-supertype handle) "text")

--- mm-decode.el.~6.38.~	Thu Jul  5 15:07:49 2001
+++ mm-decode.el	Mon Jul  9 16:42:12 2001
@@ -178,7 +178,9 @@
     ("application/pkcs7-signature" ignore identity)
     ("multipart/alternative" ignore identity)
     ("multipart/mixed" ignore identity)
-    ("multipart/related" ignore identity))
+    ("multipart/related" ignore identity)
+    ;; Default to displaying as text
+    (".*" mm-inline-text identity))
   "Alist of media types/tests saying whether types can be displayed inline."
   :type '(repeat (list (string :tag "MIME type")
 		       (function :tag "Display function")
@@ -192,8 +194,7 @@
     "application/pkcs7-signature")
   "List of media types that are to be displayed inline.
 See also `mm-inline-media-tests', which says how to display a media
-type inline.  If no media test is defined, the default is to treat the
-type as plain text."
+type inline."
   :type '(repeat string)
   :group 'mime-display)
 
@@ -541,7 +542,8 @@
 	(mm-remove-part handle)
       (let* ((type (mm-handle-media-type handle))
 	     (method (mailcap-mime-info type)))
-	(if (mm-inlined-p handle)
+	(if (and (mm-inlinable-p handle)
+		 (mm-inlined-p handle))
 	    (progn
 	      (forward-line 1)
 	      (mm-display-inline handle)
@@ -744,7 +746,7 @@
 (defun mm-display-inline (handle)
   (let* ((type (mm-handle-media-type handle))
 	 (function (cadr (mm-assoc-string-match mm-inline-media-tests type))))
-    (funcall (or function #'mm-inline-text) handle)
+    (funcall function handle)
     (goto-char (point-min))))
 
 (defun mm-assoc-string-match (alist type)
@@ -764,8 +766,21 @@
 	      methods nil)))
     result))
 
+(defun mm-inlinable-p (handle)
+  "Say whether HANDLE can be displayed inline."
+  (let ((alist mm-inline-media-tests)
+	(type (mm-handle-media-type handle))
+	test)
+    (while alist
+      (when (string-match (caar alist) type)
+	(setq test (caddar alist)
+	      alist nil)
+	(setq test (funcall test handle)))
+      (pop alist))
+    test))
+
 (defun mm-inlined-p (handle)
-  "Say whether the user wants HANDLE to be displayed automatically."
+  "Say whether the user wants HANDLE to be displayed inline."
   (let ((methods mm-inlined-types)
 	(type (mm-handle-media-type handle))
 	method result)
@@ -783,7 +798,8 @@
 	ty)
     (catch 'found
       (while (setq ty (pop types))
-	(when (string-match ty type)
+	(when (and (string-match ty type)
+		   (mm-inlinable-p ty))
 	  (throw 'found t))))))
 
 (defun mm-inline-override-p (handle)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-09 20:56     ` Colin Walters
@ 2001-07-10  0:06       ` ShengHuo ZHU
  2001-07-11 16:05       ` Paul Jarc
  1 sibling, 0 replies; 10+ messages in thread
From: ShengHuo ZHU @ 2001-07-10  0:06 UTC (permalink / raw)


Colin Walters <walters@cis.ohio-state.edu> writes:

> Colin Walters <walters@cis.ohio-state.edu> writes:
> 
>> Yeah, this is my fault, I think.  Patch in the works.
> 
> Ok, this should fix the problems, I hope.  I think it's better anyways
> than the previous patch, because now we leave the choice of
> "defaulting" to text/plain up to the user, by putting it in
> `mm-inline-media-tests'.

Installed.

ShengHuo


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-09 20:56     ` Colin Walters
  2001-07-10  0:06       ` ShengHuo ZHU
@ 2001-07-11 16:05       ` Paul Jarc
  2001-07-11 18:58         ` Raymond Scholz
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Jarc @ 2001-07-11 16:05 UTC (permalink / raw)


Colin Walters <walters@cis.ohio-state.edu> writes:
> Colin Walters <walters@cis.ohio-state.edu> writes:
>> Yeah, this is my fault, I think.  Patch in the works.
> 
> Ok, this should fix the problems, I hope.

I just upgraded to current CVS, and my problem persists. :(  Maybe
this fixed Raymond's problem, though.


paul


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-11 16:05       ` Paul Jarc
@ 2001-07-11 18:58         ` Raymond Scholz
  0 siblings, 0 replies; 10+ messages in thread
From: Raymond Scholz @ 2001-07-11 18:58 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> I just upgraded to current CVS, and my problem persists. :(  Maybe
> this fixed Raymond's problem, though.

Yes, it did :)

Cheers, Ray
-- 
/* Halley */ (Halley's comment.)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-07  4:06 first MIME part not displayed Paul Jarc
  2001-07-07 18:35 ` Raymond Scholz
@ 2001-07-11 19:33 ` Colin Walters
  2001-07-11 19:51   ` Paul Jarc
  2001-07-12 17:13 ` ShengHuo ZHU
  2 siblings, 1 reply; 10+ messages in thread
From: Colin Walters @ 2001-07-11 19:33 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> I wrote a message using Oort as of 2001-06-27, attaching a patch
> file to the message.  It looks like it was encoded ok, but that Gnus
> as well as a checkout from just now both display the message without
> the first MIME part (where the actual text of the message is).  The
> message is here: <URL:http://multivac.cwru.edu./prj/attach-message>
> [...]

Isn't that incorrectly formatted?  My knowledge of MIME is only
passing, but when I tried adding

,----[ MIME header ]
| --=-=-=
| Content-Type: text/plain
| Content-Disposition: inline
`----

before the text part, Gnus displayed it just fine when I did a 'G f'
on it.  Any MIME gurus care to comment?

I put up the modified message here:

<URL:http://www.cis.ohio-state.edu/~walters/attach-message2>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-11 19:33 ` Colin Walters
@ 2001-07-11 19:51   ` Paul Jarc
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Jarc @ 2001-07-11 19:51 UTC (permalink / raw)


Colin Walters <walters@cis.ohio-state.edu> writes:
> prj@po.cwru.edu (Paul Jarc) writes:
>> I wrote a message using Oort as of 2001-06-27, attaching a patch
>> file to the message.  It looks like it was encoded ok,
> 
> Isn't that incorrectly formatted?

Apparently so.  I guess it was a MIME encoding bug in that version of
Oort, but it seems to be fixed now.


paul


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: first MIME part not displayed
  2001-07-07  4:06 first MIME part not displayed Paul Jarc
  2001-07-07 18:35 ` Raymond Scholz
  2001-07-11 19:33 ` Colin Walters
@ 2001-07-12 17:13 ` ShengHuo ZHU
  2 siblings, 0 replies; 10+ messages in thread
From: ShengHuo ZHU @ 2001-07-12 17:13 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> I wrote a message using Oort as of 2001-06-27, attaching a patch file
> to the message.  It looks like it was encoded ok, but that Gnus as
> well as a checkout from just now both display the message without the
> first MIME part (where the actual text of the message is).  The
> message is here: <URL:http://multivac.cwru.edu./prj/attach-message>
> and Gnus displays it like this:

I don't think the encoded is OK. The boundary before the first part is
missing.

ShengHuo


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-07-12 17:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-07  4:06 first MIME part not displayed Paul Jarc
2001-07-07 18:35 ` Raymond Scholz
2001-07-09 20:22   ` Colin Walters
2001-07-09 20:56     ` Colin Walters
2001-07-10  0:06       ` ShengHuo ZHU
2001-07-11 16:05       ` Paul Jarc
2001-07-11 18:58         ` Raymond Scholz
2001-07-11 19:33 ` Colin Walters
2001-07-11 19:51   ` Paul Jarc
2001-07-12 17:13 ` ShengHuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).