From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81703 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.gnus.general Subject: Re: multipart/related; not multipart/mixed; RFC 2387; html, embedded png Date: Tue, 10 Apr 2012 21:55:55 +0200 Message-ID: <87y5q3cqes.fsf@mat.ucm.es> References: <87398b4m7w.fsf@gilgamesch.quim.ucm.es> Reply-To: Uwe Brauer NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334087788 10726 80.91.229.3 (10 Apr 2012 19:56:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Apr 2012 19:56:28 +0000 (UTC) Cc: ding@gnus.org To: Lars Magne Ingebrigtsen Original-X-From: ding-owner+M29982@lists.math.uh.edu Tue Apr 10 21:56:28 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SHhAw-0007NG-3H for ding-account@gmane.org; Tue, 10 Apr 2012 21:56:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1SHhAo-00064A-RB; Tue, 10 Apr 2012 14:56:18 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SHhAn-000641-Qw for ding@lists.math.uh.edu; Tue, 10 Apr 2012 14:56:17 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SHhAj-00057G-8D for ding@lists.math.uh.edu; Tue, 10 Apr 2012 14:56:17 -0500 Original-Received: from mail-we0-f172.google.com ([74.125.82.172]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1SHhAh-00030k-Lq; Tue, 10 Apr 2012 21:56:11 +0200 Original-Received: by werb10 with SMTP id b10so156158wer.17 for ; Tue, 10 Apr 2012 12:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:x-mailer:from:to:cc:subject:references:reply-to:x-hashcash :x-hashcash:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=2RU+CZ4UM3zQtDuKhjcwqxozkYmVkkDXGWzeZRiIbx8=; b=gQ4WjDGYb1iKCpdK2wQHX9MXdLaT2RBhmny0IrSwz+SkEYZWqIDpEuax55tevnMtzH PogNPBzXBhWUGyQh0cgRQlsCQ7sDODm1+SkeMe/P8q0HSQsGGOCL8UEM2AEogPeMXkX6 YfT9oXnBDn6JpBoHOchNQhShIygJcfqwLEu7D67bOpQs2tPaGG81TP5yqawQ6Ry8teS2 aKcboIQ5humpnEcfiYWkM9sqU/qJNDF+MdPUv7EkZXDCayYaBIhZ/SHzbT+XQtdoWtTt 8FOvuI6dnjcMCMwuVkwqtKY2fXiQOj6t1Bmgt8RrEEXfZHKrRM293Y762iyiorVxZlEd n6Nw== Original-Received: by 10.180.105.194 with SMTP id go2mr9853123wib.22.1334087765966; Tue, 10 Apr 2012 12:56:05 -0700 (PDT) Original-Received: from Burrurr (11.pool85-54-11.dynamic.orange.es. [85.54.11.11]) by mx.google.com with ESMTPS id k6sm39774281wiy.7.2012.04.10.12.56.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 12:56:04 -0700 (PDT) X-Mailer: 21.5 (beta31) "ginger" XEmacs Lucid (via feedmail 11-beta-1 I) X-Hashcash: 1:20:120410:ding@gnus.org::An62oZM0YnZbx7Gr:00000Z/r X-Hashcash: 1:20:120410:larsi@gnus.org::ZndqrAWlomM5y1Ue:0000aW+ In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 10 Apr 2012 20:41:28 +0200") User-Agent: Gnus/5.110018 (No Gnus v0.18) XEmacs/21.5-b31 (linux) X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81703 Archived-At: >> On Tue, 10 Apr 2012 20:41:28 +0200, Lars Magne Ingebrigtsen wrote: > Uwe Brauer writes: > If it's an HTML message that includes an image, then multipart/related > is correct. Well fine, but my point is: gnus does *not* do the correct thing!!! It inserts Content-type: multipart/mixed; boundary="=-=-=" in the header, so this seems a bug or, at least, a missing feature. The only way I solved this issue was to change (defun mml-generate-mime () "Generate a MIME message based on the current MML document." (let ((cont (mml-parse)) (mml-multipart-number mml-multipart-number)) (if (not cont) nil (mm-with-multibyte-buffer (if (and (consp (car cont)) (= (length cont) 1)) (mml-generate-mime-1 (car cont)) ; (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed")) (mml-generate-mime-1 (nconc (list 'multipart '(type . "related")) cont))) (buffer-string))))) But that seems to me a very ugly solution and besides it might cause some inconvenience which I am not aware of. I don't understand the structure of mml, so I don't know what really to suggest. I would introduce a new variable mml-mime-use-related and wrap into the mml-generate-mime function. Then I would modify the org-mime-htmlize function such that it sets mml-mime-use-related to t, and finally I would insert a function into the send hook which would reset the variable again to nil. I presume there are much more elegant solutions.