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 11:16:45 +0200

To: Daniel Schoepe

Cc: notmuch@notmuchmail.org

From: Thomas Schwinge


Hi!

Good idea!


On Wed,  6 Jul 2011 16:18:01 +0200, Daniel Schoepe <daniel.schoepe@googlemail.com> wrote:
> +(defun notmuch-show-buttonise-links (start end)
> +  "Buttonise URLs and mail addresses between START and END.
> +
> +This also turns id:\"<message id>\"-parts into buttons for
> +a corresponding notmuch search."
> +  (goto-address-fontify-region start end)
> +  (save-excursion
> +    (goto-char start)
> +    (while (re-search-forward "id:\"[^ ]+\"" end t)

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.


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.


Grüße,
 Thomas
part-000.sig (application/pgp-signature)

Thread: