Gnus development mailing list
 help / color / mirror / Atom feed
From: ShengHuo ZHU <zsh@cs.rochester.edu>
Subject: Re: Postprocessing / custom attributes on MML parts
Date: Fri, 27 Jul 2001 09:52:08 -0700	[thread overview]
Message-ID: <2npuamb9hj.fsf@piglet.jia.vnet> (raw)
In-Reply-To: <87n15tgdh2.fsf@smarttrust.com>

Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> writes:

> ShengHuo ZHU wrote:
>>> Hope you get my point.
>> 
>> Give me a good example about your custom processing.
> 
> Well, a simple one:
> 
> <#part type="text/plain" disposition=inline postprocess=ispell>
> 
> Ispell _this part only_ before sending. The same thing one would do
> message-send-hook, but only for a specific part. And also that you
> wouldn't have to do it always, but you could specify it by hand for
> parts that you want checked.

Actually, ispell should not be put here. mml-generate-mime will be
called more than once if there is "Gcc:" head or so.  Beside,
post-processing was called on the buffer containing generated mime,
therefore, the content could be some encoded text. You should still
use message-send-hook and find the certain part.

> Other things I'd want it for would be format=flowed generation through
> the distinction between hard and soft newlines or other things. Then
> more complex things would be to have for example a text/enriched part
> that would be translated to both a text/enriched part and a text/plain
> part is multipart/alternative, but that might be outside the scope of
> such a simple post-processing function.

This is reasonable, but not an example for post-processing because of
the same reason stated above.  Anyway, I've added mml-tweak-type-alist
and mml-tweak-function-alist for this purpose. For example:

<#part type="text/plain" disposition=inline tweak=my-enrich-part>

and define a function my-enrich-part.  

This part of code is not tested. If you found bugs, please report them.

ShengHuo


      reply	other threads:[~2001-07-27 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-18 14:43 Nuutti Kotivuori
2001-07-24  6:07 ` ShengHuo ZHU
2001-07-25 16:50   ` Nuutti Kotivuori
2001-07-27 16:52     ` ShengHuo ZHU [this message]

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=2npuamb9hj.fsf@piglet.jia.vnet \
    --to=zsh@cs.rochester.edu \
    /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).