Gnus development mailing list
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: ding@gnus.org
Subject: Re: multipart/related; not multipart/mixed; RFC 2387; html, embedded png
Date: Tue, 10 Apr 2012 21:55:55 +0200	[thread overview]
Message-ID: <87y5q3cqes.fsf@mat.ucm.es> (raw)
In-Reply-To: <m3aa2j4eg7.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Tue, 10 Apr 2012 20:41:28 +0200")

>> On Tue, 10 Apr 2012 20:41:28 +0200, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

   > Uwe Brauer <oub@mat.ucm.es> 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.




  reply	other threads:[~2012-04-10 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 15:53 Uwe Brauer
2012-04-10 18:41 ` Lars Magne Ingebrigtsen
2012-04-10 19:55   ` Uwe Brauer [this message]
2012-04-10 22:36     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5q3cqes.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=ding@gnus.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).