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