Re: [PATCH v2] emacs: Turn id:"<message-id>" elements into buttons for notmuch searches

Subject: Re: [PATCH v2] emacs: Turn id:"<message-id>" elements into buttons for notmuch searches

Date: Mon, 17 Oct 2011 14:13:05 +0200

To: Thomas Schwinge

Cc: notmuch@notmuchmail.org

From: Daniel Schoepe


On Mon, 17 Oct 2011 11:16:45 +0200, Thomas Schwinge <thomas@schwinge.name> wrote:
> Is it permissible for message IDs to contain double quotes?  If not (and
> I hope so), might id:\"[^\"]+\" be a better regexp?  (Untested.)  As it
> appears to me, this would allow proper matching in text like this, too:
> 
>     Bla bla, see id:"some@thing".  Bla bla.

My patch already works for this example, and I don't think spaces are
allowed in message IDs, so it shouldn't make a difference.

> Even if not favorable, should a syntax without double quotes be
> supported, too?  Here we'd really have to match on whitespace and line
> end, as everything else is too ambiguous.

I guess the syntaxes we have to support are those produced by notmuch
frontends, at least until other mailing lists start using this kind of
references as well. I don't think the quotes are necessary, since the
IDs don't contain any spaces, so your suggestion would be
preferable (of course, that might lead to more id:..-texts turned into
links even though they aren't intended to be). 
I'll send an edited patch later.

Cheers,
Daniel
part-000.sig (application/pgp-signature)

Thread: