Re: Replacing a message with its filtered output

2002-03-22 Thread Gary Johnson
On Fri, Mar 22, 2002 at 12:40:40PM -0500, Rob Reid wrote: > At 8:42 PM EST on March 21 Gary Johnson sent off: > > > And then if the message had a good reason to use HTML, I'd have to dig up > > > how to *not* auto_view it, in order to send it to a real browser. That's > > > why I stopped using

Re: Replacing a message with its filtered output

2002-03-22 Thread David T-G
Rob -- ...and then Rob Reid said... % % At 6:10 AM EST on March 22 Nicolas Rachinsky sent off: % > % > What happens if some mail is delivered to your inbox while you are % > executing this macro? I think your mailbox will get corrupt. % % I'm not completely sure what happens, but my mail come

Re: Replacing a message with its filtered output

2002-03-22 Thread Rob Reid
At 6:10 AM EST on March 22 Nicolas Rachinsky sent off: > * Rob Reid <[EMAIL PROTECTED]> [2002-03-21 19:10:40 -0500]: > > macro index "H" "|/home/reid/bin/stripmime.pl >> /var/spool/mail/reid" > > What happens if some mail is delivered to your inbox while you are > executing this macro? I think y

Re: Replacing a message with its filtered output

2002-03-22 Thread Rob Reid
At 8:42 PM EST on March 21 Gary Johnson sent off: > On Thu, Mar 21, 2002 at 07:58:16PM -0500, Rob Reid wrote: > > I've tried w3m and stripmime does just as well. In fact, I don't want any > > fancy interpretation of HTML mail by default - it slows things down and can > > be dangerous if the HTML

Re: Replacing a message with its filtered output

2002-03-22 Thread darren chamberlain
Quoting Mike Schiraldi <[EMAIL PROTECTED]> [Mar 21, 2002 17:17]: > #! /usr/bin/perl -W > while(<>) { print; s/\r//g; chomp; last unless $_; } > while(<>) { y/A-Za-z/N-ZA-Mn-za-m/; print; } while (<>) { (1 .. /^$/) ? s/\r\n//g : y/A-Za-z/N-ZA-Mn-za-m/; print; } :) (darren) -- A

Re: Replacing a message with its filtered output

2002-03-22 Thread Nicolas Rachinsky
* Rob Reid <[EMAIL PROTECTED]> [2002-03-21 19:10:40 -0500]: > At 5:18 PM EST on March 21 Mike Schiraldi sent off: > > I don't know. It would be nice to press the key bound to and type, > > like, > > perl -pe 's/<.*?>//g' > > to remove all HTML tags from a message. > > It's practically a necess

Re: Replacing a message with its filtered output

2002-03-21 Thread Rocco Rutte
Hi, On Thu, Mar 21, 2002 at 04:33:47:PM -0800 Gary Johnson wrote: > You're going to too much work, and I would imagine that the results > don't look very good. To fix HTML e-mail, just put this in your mailcap > file: > text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput > and thi

Re: Replacing a message with its filtered output

2002-03-21 Thread Gary Johnson
On Thu, Mar 21, 2002 at 07:58:16PM -0500, Rob Reid wrote: > At 7:33 PM EST on March 21 Gary Johnson sent off: > > You're going to too much work, and I would imagine that the results > > don't look very good. To fix HTML e-mail, just put this in your mailcap > > file: > > > > text/html; w3m

Re: Replacing a message with its filtered output

2002-03-21 Thread Rob Reid
At 7:33 PM EST on March 21 Gary Johnson sent off: > On Thu, Mar 21, 2002 at 07:10:40PM -0500, Rob Reid wrote: > > # Despite the name, stripmime.pl is really for deHTMLization. > > macro index "H" "|/home/reid/bin/stripmime.pl >> /var/spool/mail/reid" > > > > i.e. it makes a copy that goes in my

Re: Replacing a message with its filtered output

2002-03-21 Thread Gary Johnson
On Thu, Mar 21, 2002 at 07:10:40PM -0500, Rob Reid wrote: > Why do you need to *replace* the message with its filtered version? > > At 5:18 PM EST on March 21 Mike Schiraldi sent off: > > I don't know. It would be nice to press the key bound to and type, > > like, > > perl -pe 's/<.*?>//g' > >

Re: Replacing a message with its filtered output

2002-03-21 Thread Rob Reid
At 6:50 PM EST on March 21 Steve Talley sent off: > One more example: > > formail -i 'References: <...>' > > to force a message into a thread (and overcome poorly-behaved mailers > that leave out the References: and In-Reply-To: headers). I like patch-1.3.25.cd.edit_threads.9.1 for that.

Re: Replacing a message with its filtered output

2002-03-21 Thread Rob Reid
Why do you need to *replace* the message with its filtered version? At 5:18 PM EST on March 21 Mike Schiraldi sent off: > I don't know. It would be nice to press the key bound to and type, > like, > perl -pe 's/<.*?>//g' > to remove all HTML tags from a message. It's practically a necessity b

Re: Replacing a message with its filtered output

2002-03-21 Thread Steve Talley
Mike Schiraldi wrote: > > > or "grep -v '^X-Priority'" would work. > > > > .. which you can use via a subshell. > > I don't know. It would be nice to press the key bound to and type, > like, > perl -pe 's/<.*?>//g' > to remove all HTML tags from a message. > > Or > tr A-Za-z N-ZA-Mn-za-m > to ro

Re: Replacing a message with its filtered output

2002-03-21 Thread Mike Schiraldi
> > or "grep -v '^X-Priority'" would work. > > .. which you can use via a subshell. I don't know. It would be nice to press the key bound to and type, like, perl -pe 's/<.*?>//g' to remove all HTML tags from a message. Or tr A-Za-z N-ZA-Mn-za-m to rot13 a message. Of course, that'd mess up t

Re: Replacing a message with its filtered output

2002-03-21 Thread Sven Guckes
* Steve Talley <[EMAIL PROTECTED]> [2002-03-21 20:35]: > One suggestion I could see for improvement would be to > prompt for a filter program (instead of an alternate editor) > and then replace the message with the STDOUT of the filter. jeez - what else does mutt have to get for this? if you want

Re: Replacing a message with its filtered output

2002-03-21 Thread Steve Talley
This is cool! Thanks Mike! One suggestion I could see for improvement would be to prompt for a filter program (instead of an alternate editor) and then replace the message with the STDOUT of the filter. That way simple things like: sed 's/\ would be something like Filter command: Any

Re: Replacing a message with its filtered output

2002-03-21 Thread Steve Talley
Mike Schiraldi wrote: > > Perhaps something as simple as renaming the edit-message function to > > tweak-message, telling it to use $tweak_prog which defaults to $editor > > if $t_p is undefined, and explaining in the manual why tweak-message is > > bound to 'e' would do it. > > How about just

Re: Replacing a message with its filtered output

2002-03-21 Thread Mike Schiraldi
Here's the patch. I wrote it, i'll let you test it. Don't forget to "sleep 1" or else mutt will assume your script didn't do anything. -- Mike Schiraldi VeriSign Applied Research Index: OPS === RCS file: /home/roessler/cvs/mutt/

Re: Replacing a message with its filtered output

2002-03-21 Thread Mike Schiraldi
> Perhaps something as simple as renaming the edit-message function to > tweak-message, telling it to use $tweak_prog which defaults to $editor > if $t_p is undefined, and explaining in the manual why tweak-message is > bound to 'e' would do it. How about just adding a command called ? It promp

Re: Replacing a message with its filtered output

2002-03-21 Thread David T-G
Steve -- This is my only other response on the subject, I promise :-) ...and then Steve Talley said... % % It looks like modifying the $editor variable and resetting it later is % the easiest solution. It's a shame mutt can't do this more elegantly. I can't imagine a more elegant way, since t

Re: Replacing a message with its filtered output

2002-03-20 Thread Steve Talley
Sven Guckes wrote: > * Steve Talley <[EMAIL PROTECTED]> [2002-03-21 00:29]: > > > > workaround: "save" the message to a new folder. edit > > > that folder (basically just that message). call mutt > > > on that folder again - and save the message back. > > > > Sounds overly complicated. > > reall

Re: Replacing a message with its filtered output

2002-03-20 Thread Steve Talley
Sven Guckes wrote: > * Steve Talley <[EMAIL PROTECTED]> [2002-03-20 23:58]: > > > The pipe command doesn't save the output of the command as a new > > version of the message. It also doesn't mark the original message > > as deleted. > > workaround: "save" the message to a new folder. edit that f

Re: Replacing a message with its filtered output

2002-03-20 Thread Sven Guckes
* Steve Talley <[EMAIL PROTECTED]> [2002-03-20 23:58]: > The pipe command doesn't save the output of > the command as a new version of the message. > It also doesn't mark the original message as deleted. well, that's why I suggested you send the resulting message to yourself again so it gets inje