Re: [PATCH] emacs: Modify notmuch-show-get-message-id to return message-id unprefixed...
authorDaniel Schoepe <daniel@schoepe.org>
Fri, 28 Oct 2011 11:06:09 +0000 (13:06 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:47 +0000 (09:39 -0800)
14/ec6b42f0ed936871b79c2a7150554edcd81d28 [new file with mode: 0644]

diff --git a/14/ec6b42f0ed936871b79c2a7150554edcd81d28 b/14/ec6b42f0ed936871b79c2a7150554edcd81d28
new file mode 100644 (file)
index 0000000..9287973
--- /dev/null
@@ -0,0 +1,159 @@
+Return-Path: <daniel@schoepe.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7D43C429E25\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Oct 2011 04:06:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.79\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.79 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_LOW=-0.7, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id JDQ9fIzZVg9G for <notmuch@notmuchmail.org>;\r
+       Fri, 28 Oct 2011 04:06:16 -0700 (PDT)\r
+Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
+       [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id B3DF6431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Oct 2011 04:06:15 -0700 (PDT)\r
+Received: by faai28 with SMTP id i28so3881463faa.26\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Oct 2011 04:06:13 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type;\r
+       bh=1+GbB7iUAOpQybymc7YiCPV/2FkoG9/QHXdzwgo0daw=;\r
+       b=Rm4ZrIbZIJGQeq4M9olqlbxlKpEZIuqIMo12ob7a5eoqel3p9au+ppGsbW1esiwS1C\r
+       mlYo3BrmzX6ORIzg95F09T/fgXBiumaXW48aStBt/YxMtJDyU7FKDFHW5mkSr7agLAlJ\r
+       PMzQVf+NL5Xe/iqWfOxr92nHzN1tpUuw0iI+4=\r
+Received: by 10.223.58.146 with SMTP id g18mr5444180fah.13.1319799973087;\r
+       Fri, 28 Oct 2011 04:06:13 -0700 (PDT)\r
+Received: from localhost (dslb-178-004-064-120.pools.arcor-ip.net.\r
+       [178.4.64.120])\r
+       by mx.google.com with ESMTPS id y17sm16802163faa.22.2011.10.28.04.06.11\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Fri, 28 Oct 2011 04:06:11 -0700 (PDT)\r
+From: Daniel Schoepe <daniel@schoepe.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Thomas Schwinge <thomas@schwinge.name>\r
+Subject: Re: [PATCH] emacs: Modify notmuch-show-get-message-id to return\r
+       message-id unprefixed with "id:".\r
+In-Reply-To: <87ehxzb0xg.fsf@servo.finestructure.net>\r
+References: <87mxdabyy8.fsf@washington.ligo-wa.caltech.edu>\r
+       <1318199748-25058-1-git-send-email-jrollins@finestructure.net>\r
+       <87ehykflzw.fsf@kepler.schwinge.homeip.net>\r
+       <87ehxzb0xg.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.9-19-ga25c9a0 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 28 Oct 2011 13:06:09 +0200\r
+Message-ID: <87r51xe5pa.fsf@gilead.invalid>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 28 Oct 2011 11:06:18 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Wed, 26 Oct 2011 19:52:59 -0700, Jameson Graef Rollins <jrollins@finestr=\r
+ucture.net> wrote:\r
+> In point of fact, do we need these quotes around message IDs at all?\r
+> Can message IDs have characters that would need to be escaped for the\r
+> shell?\r
+\r
+Message ID syntax is defined in RFC 2822[1]:\r
+> message-id      =3D       "Message-ID:" msg-id CRLF\r
+>=20\r
+> in-reply-to     =3D       "In-Reply-To:" 1*msg-id CRLF\r
+>=20\r
+> references      =3D       "References:" 1*msg-id CRLF\r
+>=20\r
+> msg-id          =3D       [CFWS] "<" id-left "@" id-right ">" [CFWS]\r
+>=20\r
+> id-left         =3D       dot-atom-text / no-fold-quote / obs-id-left\r
+>=20\r
+> id-right        =3D       dot-atom-text / no-fold-literal / obs-id-right\r
+>=20\r
+> no-fold-quote   =3D       DQUOTE *(qtext / quoted-pair) DQUOTE\r
+>\r
+> no-fold-literal =3D       "[" *(dtext / quoted-pair) "]"\r
+\r
+And since\r
+> quoted-pair     =3D       ("\" text) / obs-qp\r
+>\r
+> text            =3D       %d1-9 /         ; Characters excluding CR and LF\r
+>                        %d11 /\r
+>                        %d12 /\r
+>                        %d14-127 /\r
+>                        obs-text\r
+\r
+It can theoretically include pretty much any character, including\r
+quotes, if they are properly escaped. Hence, the query parser would have\r
+to take that into account, but surrounding them by quotes probably isn't\r
+useful anyway.\r
+\r
+As far passing things to the shell goes:\r
+\r
+> atext           =3D       ALPHA / DIGIT / ; Any character except controls,\r
+>                         "!" / "#" /     ;  SP, and specials.\r
+>                         "$" / "%" /     ;  Used for atoms\r
+>                         "&" / "'" /\r
+>                         "*" / "+" /\r
+>                         "-" / "/" /\r
+>                         "=3D" / "?" /\r
+>                         "^" / "_" /\r
+>                         "`" / "{" /\r
+>                         "|" / "}" /\r
+>                         "~"\r
+>=20\r
+> atom            =3D       [CFWS] 1*atext [CFWS]\r
+>=20\r
+> dot-atom        =3D       [CFWS] dot-atom-text [CFWS]\r
+>=20\r
+> dot-atom-text   =3D       1*atext *("." 1*atext)\r
+\r
+So, they can contain things like "$foo@$bar", which will be mangled if\r
+passed to the shell, even with double quotes.\r
+\r
+[1] http://tools.ietf.org/html/rfc2822#section-3.6.4\r
+\r
+Cheers,\r
+Daniel\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQIcBAEBAgAGBQJOqoyhAAoJEIaTAtce+Z+JE6kP/Rvkh9Yb6a+2Jl0WzLJkk0xz\r
+j0aI48bXpKbY12OEwOuXRJ75WPMOOh5b9KnkCF7wNIRVAdmy4RX37LjgMRgku29g\r
+2L7hzpbYvFCsg6Jz1uDBH3iBX3THdu0+DIc3RffRvOWPSVBz3/tjK8kscTnPEhvJ\r
+6fFDN9KB7kJ5wDFkEwj9IGaQFHP0Yk3LgcQ8BSjmnHRhOvXLKBN2yHoVbhgsAkWw\r
+OJKEcyZPvx7sEyoekLu9DEfJw/GchTOBAg3wa0PYP1+cjd9SWo68McnKJG6pi8mX\r
+AThWHRHQs7oR8FABc3ZJ4ftrpIdhIXWvLOklE7JCvdGI6+CX86QRdK/QYCqZaYUZ\r
+Xkcb8Zm+JwkHc9aHFioTaOiVUclIip2j4XGR8YvfDhyvArpZJXESnbT4xCAMgKFM\r
+CmLAA2ylGou/xyMmE/k24iuadhIvO8z09J9CQkRE3/bG0CsMtJfs01Akkdi7GPjz\r
+XpHHj0g5+0EtJx2GPvGxJ5j+aV5MPHuZ/kjycdcGbb39/TjqlcCUbvLz+2l8ywJQ\r
+ymaC0HNthmYmv7dtB+o4LfHa+mFT/bmQX4bDCdLLGbQrcCSWAlBhvG388C1r3L7f\r
++BftxK1pMKNoq2d5SJhprAQDyEkPagUuMxIFOKKViHXlc1xigi0RGdY1VFaEbQIi\r
+nB/22OheS5cmM4Ix1r4y\r
+=EswG\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r