unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3648: Gnus doubles MIME tags
@ 2009-06-22 12:11 Katsumi Yamaoka
  2009-06-23 22:39 ` Katsumi Yamaoka
  2009-06-23 22:39 ` Katsumi Yamaoka
  0 siblings, 2 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2009-06-22 12:11 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: ding

Hi,

You might have ever seen a MIME tag in the Gnus article buffer
like this:

[2. 
 non-ascii-filename.pdf --- application/pdf; non-ascii-filename.pdf]...

Note that the tag is broken into two lines.

In such a case, typing the `E' command there to display
the attachment externally doubles the tag like:

[2. 
 non-ascii-filename.pdf --- application/pdf; non-ascii-filename.pdf]...
 non-ascii-filename.pdf --- application/pdf; non-ascii-filename.pdf]...

or

[2. 
[2. 
 non-ascii-filename.pdf --- application/pdf; non-ascii-filename.pdf]...

I found this is due to M$'s MIME encoder.  In the raw form,
the MIME header it made looks like this:

Content-Description:
 =?iso-8859-1?Q?non-ascii-filename.pdf?=

It's ugly but is not a bug.  Gnus decodes it including the first
newline and displays it in the MIME tag as is.  However, Gnus
works properly only with a MIME tag drawn in a single line.

The following patch solves it.  It uses `message-fetch-field'
that strips newlines instead of `mail-fetch-field'.

(I don't know how I commit it to the Emacs trunk and also
 the branches, so I post it here.)

2009-06-22  Katsumi Yamaoka  <yamaoka@jpl.org>

	* mm-decode.el (mm-dissect-buffer): Use message-fetch-field instead of
	mail-fetch-field to fetch Content-Description header in order to
	exclude newlines.

--- mm-decode.el~	2009-01-22 08:09:02 +0000
+++ mm-decode.el	2009-06-22 11:52:50 +0000
@@ -563,7 +563,7 @@
 		ctl (and ct (mail-header-parse-content-type ct))
 		cte (mail-fetch-field "content-transfer-encoding")
 		cd (mail-fetch-field "content-disposition")
-		description (mail-fetch-field "content-description")
+		description (message-fetch-field "content-description")
 		id (mail-fetch-field "content-id"))
 	  (unless from
 	    (setq from (mail-fetch-field "from")))

Regards,





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

* bug#3648: Gnus doubles MIME tags
  2009-06-22 12:11 bug#3648: Gnus doubles MIME tags Katsumi Yamaoka
  2009-06-23 22:39 ` Katsumi Yamaoka
@ 2009-06-23 22:39 ` Katsumi Yamaoka
  1 sibling, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2009-06-23 22:39 UTC (permalink / raw)
  To: 3648; +Cc: emacs-pretest-bug, ding

>>>>> Katsumi Yamaoka wrote:
[...]

> (I don't know how I commit it to the Emacs trunk and also
>  the branches, so I post it here.)

Ok.  I've committed this bugfix in the trunk, the EMACS_23_1_RC
branch and the Gnus trunk.

> 2009-06-22  Katsumi Yamaoka  <yamaoka@jpl.org>

> 	* mm-decode.el (mm-dissect-buffer): Use message-fetch-field instead of
> 	mail-fetch-field to fetch Content-Description header in order to
> 	exclude newlines.





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

* bug#3648: Gnus doubles MIME tags
  2009-06-22 12:11 bug#3648: Gnus doubles MIME tags Katsumi Yamaoka
@ 2009-06-23 22:39 ` Katsumi Yamaoka
  2009-06-23 22:39 ` Katsumi Yamaoka
  1 sibling, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2009-06-23 22:39 UTC (permalink / raw)
  To: 3648; +Cc: emacs-pretest-bug, ding

>>>>> Katsumi Yamaoka wrote:
[...]

> (I don't know how I commit it to the Emacs trunk and also
>  the branches, so I post it here.)

Ok.  I've committed this bugfix in the trunk, the EMACS_23_1_RC
branch and the Gnus trunk.

> 2009-06-22  Katsumi Yamaoka  <yamaoka@jpl.org>

> 	* mm-decode.el (mm-dissect-buffer): Use message-fetch-field instead of
> 	mail-fetch-field to fetch Content-Description header in order to
> 	exclude newlines.





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

end of thread, other threads:[~2009-06-23 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 12:11 bug#3648: Gnus doubles MIME tags Katsumi Yamaoka
2009-06-23 22:39 ` Katsumi Yamaoka
2009-06-23 22:39 ` Katsumi Yamaoka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).