From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AFFCB429E26 for ; Mon, 17 Oct 2011 02:17:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KqmKBki8rNlH for ; Mon, 17 Oct 2011 02:17:21 -0700 (PDT) X-Greylist: delayed 47541 seconds by postgrey-1.32 at olra; Mon, 17 Oct 2011 02:17:20 PDT Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.29.8]) by olra.theworths.org (Postfix) with ESMTP id CCBC4429E25 for ; Mon, 17 Oct 2011 02:17:20 -0700 (PDT) Received: from [87.180.87.168] (helo=stokes.schwinge.homeip.net) by smtprelay04.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1RFjJt-0007Gb-L0 for notmuch@notmuchmail.org; Mon, 17 Oct 2011 11:17:18 +0200 Received: (qmail 4901 invoked from network); 17 Oct 2011 09:16:50 -0000 Received: from kepler.schwinge.homeip.net (192.168.111.7) by stokes.schwinge.homeip.net with QMQP; 17 Oct 2011 09:16:50 -0000 Received: (nullmailer pid 32461 invoked by uid 1000); Mon, 17 Oct 2011 09:16:50 -0000 From: Thomas Schwinge To: Daniel Schoepe Subject: Re: [PATCH v2] emacs: Turn id:"" elements into buttons for notmuch searches In-Reply-To: <1309961881-28333-2-git-send-email-daniel.schoepe@googlemail.com> References: <1309896760-378-1-git-send-email-daniel.schoepe@googlemail.com> <1309961881-28333-1-git-send-email-daniel.schoepe@googlemail.com> <1309961881-28333-2-git-send-email-daniel.schoepe@googlemail.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Mon, 17 Oct 2011 11:16:45 +0200 Message-ID: <8739es0ygy.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Df-Sender: dGhvbWFzQHNjaHdpbmdlLm5hbWU= Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 09:17:21 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Good idea! On Wed, 6 Jul 2011 16:18:01 +0200, Daniel Schoepe wrote: > +(defun notmuch-show-buttonise-links (start end) > + "Buttonise URLs and mail addresses between START and END. > + > +This also turns 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=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOm/J9AAoJEGe3hdm9kOiiTKkIAOdCWGu291dw0AuDxBPKrbzq hAYPLRyoUpNeTn+NS/2HXGHzeaYbtdHHDOzz5f+gPNjB0YI7JVxRSs9nR5KnzBnl xWTqYlBJj03FminUiAiuxV++Fg79haX7fHct0g/WGuO/BLKDRm/XG8g38MeJ7TMu YzQ7ij2+cHmS3zQXUk5j9vj+3c2c3XjNYO6C3avgJ2T9gIuh7Vz5iu56WbRUvtsn iK+UtexNo1sYVpvnfkvTdMs0Xs9W+lwd4YIHlcswX/0asYb6hztSQd/EKZSX52pb eDuihA/cobmjRmLZjs8UlUCLCvBNvOXU8BwlMvIJHHTTk+EldU9veRjqyh773Lc= =2MCh -----END PGP SIGNATURE----- --=-=-=--