Rob --

...and then Rob Reid said...
% 
% Hi,

Hello!


% 
% At  1:24 PM EDT on April 23 David T-G sent off:
...
% > > So how can I do three levels of quoting?  Is it possible, and is there a
% > > way I can avoid it?
% > 
% > 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.  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.


% should.  Of course, testing is a pain since it means restarting mutt to undo
% the bad folder-hooks.

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; I'm not yet
using SA :-)


% 
% > Meanwhile, generally the way to escape embedded quotes is to not just
% > escape the quote but also escape your escape char, since the first pass
% > over the line (the folder-hook level) will not only remove the outer set
% > of quotes (doubles above) but also take literally any escaped characters
% > and get rid of your escaping -- but that's usually too early!  It can be
% 
% 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.

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]) the bang and parens are protected, so
this really is all about the backslashes.  So *now* I wonder why they're
necessary at all.  It sounds like a layer of quoting is disappearing
that would make them special chars, but then that doesn't make sense
for the spaces.  Gah!


% 
% Note the different escaping method for ^.

Yeah; why?  Unless it's because of my theory that your outermost double
quotes are going away...


% 
% Hopefully some other SpamAssassin users will find this helpful.

Hey, if it works then it's helpful :-)


% 
% -- 
% Faith, n. Belief without evidence in what is told by one who speaks without
% knowledge, of things without parallel. - A. Bierce, The Devil's Dictionary
% Robert I. Reid | PGP/GPG Keys: http://astro.utoronto.ca/~reid/pgp.html


:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg27560/pgp00000.pgp
Description: PGP signature

Reply via email to