[PATCH v2] emacs: Turn id:"<message-id>" elements into buttons for notmuch searches
Thomas Schwinge
thomas at schwinge.name
Mon Oct 17 02:16:45 PDT 2011
Hi!
Good idea!
On Wed, 6 Jul 2011 16:18:01 +0200, Daniel Schoepe <daniel.schoepe at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111017/aff3c28e/attachment.pgp>
More information about the notmuch
mailing list