Re: [PATCH 2/5] Add quotes around id:"message-id" queries.

Subject: Re: [PATCH 2/5] Add quotes around id:"message-id" queries.

Date: Fri, 2 Jul 2010 04:41:43 +0000 (UTC)

To: notmuch@notmuchmail.org

Cc:

From: Olly Betts


On 2010-07-01, Dmitry Kurochkin wrote:
> -  (concat "id:" (notmuch-show-get-prop :id props)))
> +  (concat "id:\"" (notmuch-show-get-prop :id props) "\""))

This is probably a good idea (the ".." example is arguably a Xapian bug so
that should be fixed soon, but you find all sorts of junk in message-ids.

However, the quoting feature this relies on was added in Xapian 1.0.18 (and
1.1.4), and with older versions this will break for *all* message-ids (even
those which currently work).

Also, if you're going to quote the message-id, you should escaping any "
characters in the message-id (by doubling them).

Cheers,
    Olly


Thread: