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 57827429E25 for ; Fri, 28 Oct 2011 04:21:52 -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=[none] 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 emgMh3JkuAUD for ; Fri, 28 Oct 2011 04:21:51 -0700 (PDT) Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id EFAC7431FB6 for ; Fri, 28 Oct 2011 04:21:50 -0700 (PDT) Received: from taco2.nixu.fi (localhost [127.0.0.1]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9SBLlYN006122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 28 Oct 2011 14:21:48 +0300 Received: (from too@localhost) by taco2.nixu.fi (8.14.3/8.14.3/Submit) id p9SBLl0m006121; Fri, 28 Oct 2011 14:21:47 +0300 X-Authentication-Warning: taco2.nixu.fi: too set sender to tomi.ollila@nixu.com using -f From: Tomi Ollila To: Daniel Schoepe Subject: Re: [PATCH] emacs: Modify notmuch-show-get-message-id to return message-id unprefixed with "id:". 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> <87r51xe5pa.fsf@gilead.invalid> X-Face: HhBM'cA~ (Daniel Schoepe's message of "Fri, 28 Oct 2011 13:06:09 +0200") Message-ID: User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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:21:52 -0000 On Fri 28 Oct 2011 14:06, Daniel Schoepe writes: > 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]: ... > As far passing things to the shell goes: > >> atext = ALPHA / DIGIT / ; Any character except controls, >> "!" / "#" / ; SP, and specials. >> "$" / "%" / ; Used for atoms >> "&" / "'" / >> "*" / "+" / >> "-" / "/" / >> "=" / "?" / >> "^" / "_" / >> "`" / "{" / >> "|" / "}" / >> "~" >> >> atom = [CFWS] 1*atext [CFWS] >> >> dot-atom = [CFWS] dot-atom-text [CFWS] >> >> dot-atom-text = 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. atext includes ' -- how inconvenient for shell's sake. Indeed, the "":s does noe disallog $var expansion, but avoids potential problems with ', |, & and ` (and smaller problems with ~, *, + and ?). Without ' allowed in msg-id writing arg between '':s in shell command line would have been convenient. Now that ":s are removed from the id: argument, maybe also '<' and ">" could be removed... (or was it xapian which handles this?) > > [1] http://tools.ietf.org/html/rfc2822#section-3.6.4 > > Cheers, > Daniel Tomi