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

Daniel Schoepe daniel.schoepe at googlemail.com
Mon Oct 17 05:13:05 PDT 2011


On Mon, 17 Oct 2011 11:16:45 +0200, Thomas Schwinge <thomas at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111017/2a99f26e/attachment.pgp>


More information about the notmuch mailing list