Re: Any way to color a line _following_ the line with 'pattern'?

2010-05-27 Thread Gary Johnson
On 2010-05-27, Mun  wrote:
> Hi,
> 
> I would like to use 'color body' to highlight a line which matches
> 'pattern' AND also highlight the successive line.  However, I couldn't
> find any way to extend 'pattern' across multiple lines.
> 
> Is such a thing possible in mutt?

I don't think you can do this with mutt's built-in coloring
facility, but I have done this using 'display_filter' and a Perl
script to add ANSI color escape sequences around text that matched
some pattern.  'allow_ansi' needs to be set in your muttrc as well
for this to work.

HTH,
Gary



Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread hubert depesz lubaczewski
On Thu, May 27, 2010 at 06:12:24PM -0300, Monte Stevens wrote:
> So, instead of
> fcc-hook @depesz.com +depesz/
> you'd have
> fcc-hook "~C @depesz\.com" +depesz/
> .
> 
> I'm not sure what you want to match so I went with the ~C which would
> evaluate as true if the message is to or cc @depesz\.com .

But fcc hook is applied to *To:* field, not From:! ?!

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007


Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread Monte Stevens
On Thu, May 27, 2010 at 12:56:59PM +0200, hubert depesz lubaczewski wrote:
> Situation:
> server martin.depesz.com
> shell account depesz.
> 
> i create test.rc with following content:
> my_hdr From: depesz 
> fcc-hook @depesz.com +depesz/
> 
> start mutt with:
> mutt -n -F test.rc
> 
> ignore messages about missing directories, write mail to myself, and on
> finish screen, i see that fcc has been correctly set to depesz/
> 
> Now. 
> 
> I change the my_hdr line to:
> my_hdr From: Marcin Pietrzak 
> 
> and now fcc_hook is no longer applied ?!
> 
> Why is that?

Perhaps it has something to do with the default_hook, which defaults to:
"~f %s !~P | (~P ~C %s)"

This would make your simple regular expression (@depesz.com) evaluate to
"~f @depesz.com !~P | (~P ~C @depesz.com)" .

Filling in the ~characters yields something like:
from @depesz.com and not from alternates or (from alternates and (to or
cc @depesz.com)) .

Solving for the first case (from: depesz ):
1 and 1 or (0 and ?) = 1 .

Solving for the second case (from: Marcin Pietrzak ):
0 and 1 or (0 and ?), = 0 .

Hopefully someone will jump in and point out any errors I've made in
translating or evaluating the patterns.  Barring any errors, I'd say the
best way out is to craft a pattern from your simple regular expression.

So, instead of
fcc-hook @depesz.com +depesz/
you'd have
fcc-hook "~C @depesz\.com" +depesz/
.

I'm not sure what you want to match so I went with the ~C which would
evaluate as true if the message is to or cc @depesz\.com .

-- 
Monte


Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread hubert depesz lubaczewski
On Thu, May 27, 2010 at 10:44:25PM +0200, Michael Tatge wrote:
> * On Thu, May 27, 2010 12:56PM +0200 hubert depesz lubaczewski 
> (dep...@depesz.com) muttered:
> > i create test.rc with following content:
> > my_hdr From: depesz 
> 
> Well you shouldn't use my_hdr unless forced too
> Just set $from instead
> 
> > fcc-hook @depesz.com +depesz/
> > 
> > start mutt with:
> > mutt -n -F test.rc
> > 
> > i see that fcc has been correctly set to depesz/
> > 
> > Now. 
> > 
> > I change the my_hdr line to:
> > my_hdr From: Marcin Pietrzak 
> > 
> > and now fcc_hook is no longer applied ?!
> 
> Somethink along the lines of
> 
> default_hook="~f %s !~P | (~P ~C %s)"
> 
> So you'd better spell out the fcc-hook pattern
> eg fcc-hook '~t @depesz.com' +depesz


I did make it working, but I just don't understand why it doesn't work
with this my_hdr.

basically I switched to $from and other $..., but it's irrelevant at the
moment - i want to understand why some values in my_hdr make it break.

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007


Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread Michael Tatge
* On Thu, May 27, 2010 12:56PM +0200 hubert depesz lubaczewski 
(dep...@depesz.com) muttered:
> i create test.rc with following content:
> my_hdr From: depesz 

Well you shouldn't use my_hdr unless forced too
Just set $from instead

> fcc-hook @depesz.com +depesz/
> 
> start mutt with:
> mutt -n -F test.rc
> 
> i see that fcc has been correctly set to depesz/
> 
> Now. 
> 
> I change the my_hdr line to:
> my_hdr From: Marcin Pietrzak 
> 
> and now fcc_hook is no longer applied ?!

Somethink along the lines of

default_hook="~f %s !~P | (~P ~C %s)"

So you'd better spell out the fcc-hook pattern
eg fcc-hook '~t @depesz.com' +depesz


HTH,

Michael
-- 
COBOL is for morons.
-- E. W. Dijkstra

PGP-Key-ID: 0xDC1A44DD
Jabber: init...@amessage.de


Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread hubert depesz lubaczewski
On Thu, May 27, 2010 at 07:55:59PM +0200, Jostein Berntsen wrote:
> On 27.05.10,12:56, hubert depesz lubaczewski wrote:
> > Situation:
> > server martin.depesz.com
> > shell account depesz.
> > 
> > i create test.rc with following content:
> > my_hdr From: depesz 
> > fcc-hook @depesz.com +depesz/
> > 
> > start mutt with:
> > mutt -n -F test.rc
> > 
> > ignore messages about missing directories, write mail to myself, and on
> > finish screen, i see that fcc has been correctly set to depesz/
> > 
> > Now. 
> > 
> > I change the my_hdr line to:
> > my_hdr From: Marcin Pietrzak 
> > 
> > and now fcc_hook is no longer applied ?!
> > 
> > Why is that?
> > 
> 
> Have you tried to restart mutt after you have applied the new fcc-hook?
 
sure. besides - this fcc is in the test.rc file.

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007


Any way to color a line _following_ the line with 'pattern'?

2010-05-27 Thread Mun
Hi,

I would like to use 'color body' to highlight a line which matches
'pattern' AND also highlight the successive line.  However, I couldn't
find any way to extend 'pattern' across multiple lines.

Is such a thing possible in mutt?

Regards,

-- 
Mun


Re: Reply to email simulating a bounced email in mutt?

2010-05-27 Thread Grant Edwards
On 2010-05-27, Patrick Shanahan  wrote:
> * Russell Urquhart  [05-27-10 09:00]:
>> 
>> I was just wondering. In the Apple email tool, there was a bounce command
>> that would reply to a given email(s) and make them look like they had
>> bounced, to the original sender.
>> 
>> Is there a similar command or way to do that in mutt?
>
> Yes, explained in TFM  :^)

No, explained in TFM.

> it is assigned to the "b" key unless you have changed it.

As explained in TFM, mutt's bounce command just sends the current
message to the specified address without any changes.

It doesn't "bounce" the current message as specifed by the OP.

-- 
Grant Edwards   grant.b.edwardsYow! Are you the
  at   self-frying president?
  gmail.com



Re: Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread Jostein Berntsen
On 27.05.10,12:56, hubert depesz lubaczewski wrote:
> Situation:
> server martin.depesz.com
> shell account depesz.
> 
> i create test.rc with following content:
> my_hdr From: depesz 
> fcc-hook @depesz.com +depesz/
> 
> start mutt with:
> mutt -n -F test.rc
> 
> ignore messages about missing directories, write mail to myself, and on
> finish screen, i see that fcc has been correctly set to depesz/
> 
> Now. 
> 
> I change the my_hdr line to:
> my_hdr From: Marcin Pietrzak 
> 
> and now fcc_hook is no longer applied ?!
> 
> Why is that?
> 

Have you tried to restart mutt after you have applied the new fcc-hook?


Jostein






Re: Reply to email simulating a bounced email in mutt?

2010-05-27 Thread Patrick Shanahan
* Russell Urquhart  [05-27-10 09:00]:
> 
> I was just wondering. In the Apple email tool, there was a bounce command
> that would reply to a given email(s) and make them look like they had
> bounced, to the original sender.
> 
> Is there a similar command or way to do that in mutt?

Yes, explained in TFM  :^)

it is assigned to the "b" key unless you have changed it.
-- 
Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://counter.li.org


Reply to email simulating a bounced email in mutt?

2010-05-27 Thread Russell Urquhart


Hi,

I was just wondering. In the Apple email tool, there was a bounce command that 
would reply to  a given email(s) and make them look like they had bounced, to 
the original sender.

Is there a similar command or way to do that in mutt?

Thanks,


Russ


Losing my mind? fcc-hook doesn't work for one *from* ?

2010-05-27 Thread hubert depesz lubaczewski
Situation:
server martin.depesz.com
shell account depesz.

i create test.rc with following content:
my_hdr From: depesz 
fcc-hook @depesz.com +depesz/

start mutt with:
mutt -n -F test.rc

ignore messages about missing directories, write mail to myself, and on
finish screen, i see that fcc has been correctly set to depesz/

Now. 

I change the my_hdr line to:
my_hdr From: Marcin Pietrzak 

and now fcc_hook is no longer applied ?!

Why is that?

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007