Gnus development mailing list
 help / color / mirror / Atom feed
* Postprocessing / custom attributes on MML parts
@ 2001-07-18 14:43 Nuutti Kotivuori
  2001-07-24  6:07 ` ShengHuo ZHU
  0 siblings, 1 reply; 4+ messages in thread
From: Nuutti Kotivuori @ 2001-07-18 14:43 UTC (permalink / raw)


It appears that the postprocess-alist was removed quite a while ago.

,----[ ChangeLog ]
| 2000-10-30 23:37:07  ShengHuo ZHU  <zsh@cs.rochester.edu>
| 
|         * mml.el (mml-generate-mime-postprocess-function): Removed.
|         (mml-postprocess-alist): Removed.
`----

How would one go about adding custom processing to mml parts nowadays?

Just something that would allow me to add:

<#part type="text/plain" disposition=inline process=foo>

And define somewhere what to either do with the process, argument - or
define somewhere an alist with foo pointing to a function run on the
part. Or something.

Hope you get my point.

-- Naked



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

* Re: Postprocessing / custom attributes on MML parts
  2001-07-18 14:43 Postprocessing / custom attributes on MML parts Nuutti Kotivuori
@ 2001-07-24  6:07 ` ShengHuo ZHU
  2001-07-25 16:50   ` Nuutti Kotivuori
  0 siblings, 1 reply; 4+ messages in thread
From: ShengHuo ZHU @ 2001-07-24  6:07 UTC (permalink / raw)


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

> It appears that the postprocess-alist was removed quite a while ago.
> 
> ,----[ ChangeLog ]
>| 2000-10-30 23:37:07  ShengHuo ZHU  <zsh@cs.rochester.edu>
>| 
>|         * mml.el (mml-generate-mime-postprocess-function): Removed.
>|         (mml-postprocess-alist): Removed.
> `----
> 
> How would one go about adding custom processing to mml parts nowadays?
> 
> Just something that would allow me to add:
> 
> <#part type="text/plain" disposition=inline process=foo>
> 
> And define somewhere what to either do with the process, argument - or
> define somewhere an alist with foo pointing to a function run on the
> part. Or something.
> 
> Hope you get my point.

Give me a good example about your custom processing.

ShengHuo


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

* Re: Postprocessing / custom attributes on MML parts
  2001-07-24  6:07 ` ShengHuo ZHU
@ 2001-07-25 16:50   ` Nuutti Kotivuori
  2001-07-27 16:52     ` ShengHuo ZHU
  0 siblings, 1 reply; 4+ messages in thread
From: Nuutti Kotivuori @ 2001-07-25 16:50 UTC (permalink / raw)
  Cc: ding

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.

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.

TIA,
-- Naked


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

* Re: Postprocessing / custom attributes on MML parts
  2001-07-25 16:50   ` Nuutti Kotivuori
@ 2001-07-27 16:52     ` ShengHuo ZHU
  0 siblings, 0 replies; 4+ messages in thread
From: ShengHuo ZHU @ 2001-07-27 16:52 UTC (permalink / raw)


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


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

end of thread, other threads:[~2001-07-27 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-18 14:43 Postprocessing / custom attributes on MML parts Nuutti Kotivuori
2001-07-24  6:07 ` ShengHuo ZHU
2001-07-25 16:50   ` Nuutti Kotivuori
2001-07-27 16:52     ` ShengHuo ZHU

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