<<< Date Index >>>     <<< Thread Index >>>

Re: Replying to a specific message



On Tue, Aug 26, 2008 at 10:35 PM, Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday, August 26 at 10:32 PM, quoth Shreevatsa R:
>> On Sun, Aug 24, 2008 at 7:24 PM, Christian Ebert <blacktrash@xxxxxxx> wrote:
>>> * Kyle Wheeler on Sunday, August 24, 2008 at 16:41:53 -0500
>>>> function reply() {
>>>>     MID=$1; shift;
>>>     mutt -e "push '<limit>~i $MID<Enter><group-reply>'" $@
>>>> }
>>
>> Thanks, everyone. One minor annoyance is when Message-IDs have special
>> characters in them, e.g., I tried replying to an email today whose
>> Message-ID had '$'s in it. In that case, the $s must be escaped, not
>> to \$, but to \\$, as mutt strips off one level of \s, according to
>> the manual. I currently simply replace each $ by \\$ and it works, but
>> asking just in case there is a well-known answer: is there some
>> general solution that mutt users use for escaping a pattern according
>> to what mutt wants?
>
> Skip the escaping, and just use quotes:
>
>     mutt -e "push '<limit>~i "$MID"<Enter><group-reply>'" $@
>
> AFAIK quote characters aren't allowed in Message-IDs.

That's probably true, but quotes don't work. Start mutt and do
<limit>~i "<a$b@c>" and it *won't* match Message-ID: <a$b@c>". Neither
will ~i '<a$b@c>' nor ~i "<a\$b@c>"; the only things that work are ~i
'<a\$b@c>' or ~i <a\\$b@c> or ~i "<a\\$b@c>" (but not ~i '<a\\$b@c>').
I would consider this behaviour a bug in mutt, probably some would
not, so I didn't mention it the last time. Is there a reason things
are this way? (A design reason, not "that's how it happens to be
implemented".)