From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37164 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Postprocessing / custom attributes on MML parts Date: Fri, 27 Jul 2001 09:52:08 -0700 Sender: zsh@piglet.jia.vnet Message-ID: <2npuamb9hj.fsf@piglet.jia.vnet> References: <87ae22s3f7.fsf@smarttrust.com> <2nbsmalv1d.fsf@piglet.jia.vnet> <87n15tgdh2.fsf@smarttrust.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172627 12441 80.91.224.250 (21 Oct 2002 03:57:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:57:07 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 5714 invoked from network); 27 Jul 2001 16:54:53 -0000 Original-Received: from unknown (HELO zsh.2y.net) (131.241.79.246) by gnus.org with SMTP; 27 Jul 2001 16:54:53 -0000 Original-Received: (from zsh@localhost) by zsh.2y.net (8.11.2/8.11.2) id f6RGq9Q14113; Fri, 27 Jul 2001 09:52:09 -0700 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 Original-Lines: 40 Xref: main.gmane.org gmane.emacs.gnus.general:37164 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37164 Nuutti Kotivuori 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