Hi, At 2:20 PM EDT on April 23 David T-G sent off: > ...and then Rob Reid said... > > At 1:24 PM EDT on April 23 David T-G sent off: > > > Rather than just escaping your single quotes because you're using single > > > quotes already, you have to escape them "deeply" enough. Starting from > ... > > > push "D~b '^SPAM...'" > > > > > > to make it work (though that part is untested). > > > > :-P Always test! I had already tried that, and it doesn't work even though > > it > > Ah; you didn't say that part.
Ain't I a stinker? > So how on earth do you get > > D"~b 'pat'" > > to work when that breaks for me? I think your double quotes are getting > eaten and you're not realizing it. I think (and you more or less said) that you've been testing D directly from mutt instead of with a folder-hook in a file. It's different, I tell ya! ;-) > Well, that's easy, since I can always pop open another window and run > mutt as many times as necessary. The real pain is developing a mailbox > where your pattern will work so that I can do the testing Would you like me to send you some spam? ;-) Fortunately it's not necessary. > > It was an escaping problem, although I thought I'd tried that with \\! But > > noooo! The second \ needs to be escaped so it has to be \\\\! The working > > hook: > > > > folder-hook spam push 'D"~b \"^^SPAM: Hit\\\\! \\\\(1 point\\\\) BODY: Image >tag with an ID code to identify you\"\n"' > > Now that is *strange*. I expected (2^^n)-1 backslashes like > > ! > \! > \\\! > \\\\\\\! > > and certainly not an even number. When you have \\! you're escaping your > escape but not protecting the bang. Exactly; protecting the escape so it can protect the ! > Oh, wait; since you're quoting your pattern (which must be working, > because you don't have to escape the spaces or fill them with dots [which > I find much easier to manage]) D'oh!! > > Note the different escaping method for ^. > > Yeah; why? Because the mutt manual says to ;-) ^x is interpreted as control-x, so mutt recognizes ^^ as ^. After that, it doesn't need any protection. Yes, it's weird, but otherwise benign. -- "He eats like a bird... five times his own weight each day." - fortune Robert I. Reid <[EMAIL PROTECTED]> http://astro.utoronto.ca/~reid/ PGP Key: http://astro.utoronto.ca/~reid/pgp.html