Rob -- ...and then Rob Reid said... % % Hi,
Hello! % % I would like to have mutt automatically mark certain messages as deleted in my ... % 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 the inside out, what you want is effectively ~b '^SPAM ...' and so you pass that pattern to delete-pattern. Now, you can skip the double quotes, because D takes a "pattern specifier" like ~b and the pattern itself (which must be quoted if it includes spaces); I just tried that in my mailbox and no means of wrapping the ~b with the pattern was acceptable. So now you have D~b '^SPAM...' and you want to put that in a folder-hook. You must protect the quotes if they will be interpolated, so you wrap the whole thing in another layer like push "D~b '^SPAM...'" to make it work (though that part is untested). 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 a real nightmare of three or even seven backslashes piled up before a special character. If you find that you have to quote the entire push command like folder-hook spam "push ..." then you'll be getting into this mess. Have fun :-) % % Thanks HTH & HAND % % -- % Documentation is like sex: when it is good, it is very, very good; and % when it is bad, it is better than nothing. - Dick Brandon % Robert I. Reid <[EMAIL PROTECTED]> http://astro.utoronto.ca/~reid/ % PGP Key: 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!
msg27557/pgp00000.pgp
Description: PGP signature