unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Editing email replies
@ 2002-08-30  3:15 pd
  2002-08-30 14:54 ` Barry Margolin
  0 siblings, 1 reply; 18+ messages in thread
From: pd @ 2002-08-30  3:15 UTC (permalink / raw)


I've been thinking about how to edit replies to MIME messages that use
multipart/alternative.  For example, suppose the message has a text/plain
alternative and a text/html alternative, as shown below.  When I insert some
plain text in my reply, I'd really like the resulting message to have the
two alternatives for the text before my insertion, then my insertion in
plain text, and then the two alternatives after my insertion.

In other words,  I want to go from:

    multipart/alternative
        text/plain
        text/html

to

    multipart/mixed
        multipart/alternative
            text/plain
            text/html
        text/plain <--- my reply!
        multipart/alternative
            text/plain
            text/html


I've shown this in more detail below, but that's the general idea.
Essentially, I want to split the alternative part into two, and put my
text/plain reply in between them.

So, is there a way to do this?  I'm planning to use emacs, but I don't know
if there's a suitable mode for editing messages that does this.

Thanks very much,

-pd


Detailed example follows.  I hope it's correct.

============= Before editing =============

Content-Type: multipart/alternative; boundary="----BAR"
    ...
------BAR
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

This is the first line of the original message.
This is the second line of the original message.

------BAR
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<HTML>
<BODY>
<BR>This is the first line of the original message.
<BR>This is the second line of the original message.
</BODY>
</HTML>

------BAR


============= After editing =============

Content-Type: multipart/mixed; boundary="--FOO"
--FOO
Content-Type: multipart/alternative; boundary="----BAR"
    ...
------BAR
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

This is the first line of the original message.

------BAR
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<HTML>
<BODY>
<BR>This is the first line of the original message.
</BODY>
</HTML>
------BAR
--FOO
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

My insertion between the first and second lines goes here.

--FOO
Content-Type: multipart/alternative; boundary="----BAR"

------BAR
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

This is the second line of the original message.

------BAR
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<HTML>
<BODY>
<BR>This is the second line of the original message.
</BODY>
</HTML>
------BAR
--FOO

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

end of thread, other threads:[~2002-09-10 12:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-30  3:15 Editing email replies pd
2002-08-30 14:54 ` Barry Margolin
2002-08-30 15:38   ` Peter Davis
2002-08-30 16:34     ` Barry Margolin
2002-08-30 15:51   ` Peter Davis
2002-08-31 16:21     ` Kai Großjohann
2002-08-31 23:18       ` Peter Davis
2002-09-01  2:02         ` Kevin A. Scaldeferri
2002-09-01  2:58           ` those who know me have no need of my name
2002-09-02 16:05           ` Peter Davis
2002-09-02 21:59             ` those who know me have no need of my name
2002-09-02 23:07             ` Kevin A. Scaldeferri
2002-09-03  1:14             ` Sacha Chua
2002-09-07 17:19             ` Benjamin Riefenstahl
2002-09-08 17:43               ` pd
2002-09-10 12:36                 ` Oliver Scholz
2002-09-01  5:17         ` Charles Muller
     [not found]         ` <mailman.1030857423.3550.help-gnu-emacs@gnu.org>
2002-09-05  1:45           ` pd

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).