This was posted on the NG comp.mail.mutt sometime ago but I have only
jsut got around to palying with it and I thought my expereinces might be
useful on the mutt list as well as the basic idea.

On Thu, Oct 19, 2000 at 04:24:36PM +0200, Johannes Segitz wrote:
> On Thu, 19 Oct 2000 13:00:18 GMT, Renaud Colinet wrote:
> >[EMAIL PROTECTED] (Frank Altpeter) wrote in
> ><8smpfc$iju$[EMAIL PROTECTED]>: 
> >
> >>
> >>Just a simple question ... is it possible to enable the mutt
> >>internal pager for viewing rot13 encoded content ?
> >
> >Just create a simple macro to filter the message through a rot13 
> >encoding script, for instance: 
> >
> >macro pager \er "| tr a-zA-Z n-za-mN-ZA-M"
> >
> >I bound it to Esc-r, which is the default in slrn.
> 
> Cool macro, but when i start it, my screen gets rushed by chars. I can
> use 
> 
> macro pager \er "| tr a-zA-Z n-za-mN-ZA-M"|less
> 
> but so i have to use less. What can i do else?
 
First, I think

macro pager \er "| tr a-zA-Z n-za-mN-ZA-M | less"

is better with the " at the end.

Second on AIX 2.3.5 I had to change this to

macro pager \er "| /usr/ucb/tr -A 'a-zA-Z' 'n-za-mN-ZA-M' | less"

The BSD tr seems better than the AIX tr (in /usr/bin). Without the ASCII
-A flag it did not quite work in a way I did not understand. It did not
translate m and LM.

Third, a problem. If the message is rot13 coded and the headers are not,
this macro of course rot13 codes the header and decodes the message. Is
there a way to only pipe the message without the headers to tr? Of
course I guess one could sed out everything up to a blank line, but I am
thinking of something simpler.

Cheers, Brian.
-- 
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia.
Phone 08-89466702.     Fax 08-89466847.     http://www.smps.ntu.edu.au/
Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html

Reply via email to