(No Subject)
Hi, I've been using nmh and MH-E for some time now and I'm very pleased with it but there is something I want to do but my knowledge falls short. When I reply to someone and cite their previous mail, I want to insert the date at which their mail was sent. Like the following: At 2022-01-27T18:04:44+, Someone wrote: I think I should be able to do it with repl -filter. I tried this: from:nocomponent,formatfield="At %(tws{date}) %(unquote(decode(friendly{text}))) writes:" body:component="> ",overflowtext="> ",overflowoffset=0 but the date appears like 00 Jan 00:00:00 so it looks like I'm using the wrong parameter. How am I supposed to include the date? Thank you. -- Regards, Thomas
Re: How to give Thomas Dupond the date in his replies.
Try replacing your mhl.reply with: date:nocomponent,nonewline,\ formatfield="In a message of %(pretty {text}), " from:nocomponent,formatfield="%(decode (friendly{text})) writes:" body:nocomponent,format,nowrap,formatarg="%(trim{content-type})%(putstr)",formatarg="%(trim{content- transfer-encoding})%(putstr)",formatarg=">" Alternatively, I got my Comments: line above to do what you want in replcomps. The last lines of my replcomps are: Comments: In-reply-to \ %<{from}%(void{from})%?(void{apparently-from})%|%(void{sender})%>\ %(trim)%(putstr)\n\ message dated "%<(nodate{date})%{date}%|%(tws{date})%>." Laura Creighton
Re: (No Subject)
>I think I should be able to do it with repl -filter. I tried this: > >from:nocomponent,formatfield="At %(tws{date}) >%(unquote(decode(friendly{text}))) writes:" I see what you're trying to do here, but sadly this won't work like this (but I understand why you're trying this). But you should be able to accomplish this another way. The answer is _in mhl_, every execution of formatfield is considered independent and doesn't have to the complete message; what happens is the selected header is provided to the formatfield snippet using the "text" pseudo-component. That's why for that above example, "text" is used instead of "from". It doesn't know about the Date header because that's never fed into it (arguably it should be, but ... well, the code is kind of a mess). You CAN get access to date header directly in the "date" line, so you COULD have it output it separately but getting both things on one line might be tough. But you should be able to do this directly in the format program provided to repl (e.g., replcomps, replgroupcomps). That one is run on the whole message and has access to all message header. So you'd put at the bottom of replcomps something like: At %(tws{date}) %(unquote(decode(friendly{text}))) writes: Or, whatever. You can get creative if you want: https://lists.nongnu.org/archive/html/nmh-workers/2015-01/msg4.html --Ken
Re: How to give Thomas Dupond the date in his replies.
>However when I do that and quote some email which is not strictly ANSI I >get these weird =C3=A9 instead of é. Some other characters are >affected. > >Do you have any idea on how to resolve that? In a perfect world mhl would be MIME-aware and just take care of that for you. We don't yet live in that world. I wrote "replyfilter" to mostly deal with that; it's a perl script that lives in the nmh contrib directory and the comments in it explain how to use it. --Ken
Re: How to give Thomas Dupond the date in his replies.
Thank you very much Laura and Ken for your suggestions. I can get 99% of what I want with the following filter file. date:nocomponent,nonewline,formatfield="At %(pretty{text}) " from:nocomponent,formatfield="%(unquote(decode(friendly{text}))) writes:" body:component="> ",overflowtext="> ",overflowoffset=0 I can get the same thing with replcomps as suggested by Ken. However when I do that and quote some email which is not strictly ANSI I get these weird =C3=A9 instead of é. Some other characters are affected. Do you have any idea on how to resolve that? -- Regards, Thomas
Re: How to give Thomas Dupond the date in his replies.
[2022-01-28 18:18] Ken Hornstein > >However when I do that and quote some email which is not strictly ANSI I > >get these weird =C3=A9 instead of é. Some other characters are > >affected. > > > >Do you have any idea on how to resolve that? > > In a perfect world mhl would be MIME-aware and just take care of that for > you. We don't yet live in that world. I wrote "replyfilter" to mostly > deal with that; it's a perl script that lives in the nmh contrib directory > and the comments in it explain how to use it. In mmh we have a workaround for this problem. To decode MIME we pipe the mail through show. I know this has a few downsides, but if you are intrested I can help to port this to nmh. Philipp
In Memoriam: Norman Z. Shapiro 1932-2021
On October 14, 2021, Norman Shapiro passed away from natural causes at the age of 89 years. Today would have been his 90th birthday. He wanted people to know he lived a long and happy life. Norman was a gifted mathematician / computer scientist and an avid bicyclist, but most of all devoted father and grandfather. Details of his career may be found on Wikipedia: https://en.wikipedia.org/wiki/Norman_Shapiro. Norman is survived by his two granddaughters, Rebecca and Rachel Gates, and his son-in-law David Gates. He was preceded in death by his wife Naomi Shapiro in 1991 and his daughter Cathy Shapiro Gates in 2021, both as a consequence of ovarian cancer. Donations in his name may be made to the Ovarian Cancer Research Alliance. May his memory be a blessing, Norman’s Family