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 3CBB0431FD0 for ; Thu, 27 Jan 2011 23:46:14 -0800 (PST) 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=unavailable 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 nZkXPY-NZtR3 for ; Thu, 27 Jan 2011 23:46:14 -0800 (PST) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.30]) by olra.theworths.org (Postfix) with ESMTP id CB21E431FB5 for ; Thu, 27 Jan 2011 23:46:13 -0800 (PST) Received: from [87.180.40.233] (helo=stokes.schwinge.homeip.net) by smtprelay03.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1Pij21-0001AM-LQ for notmuch@notmuchmail.org; Fri, 28 Jan 2011 08:46:09 +0100 Received: (qmail 16966 invoked from network); 28 Jan 2011 07:45:39 -0000 Received: from kepler.schwinge.homeip.net (192.168.111.7) by stokes.schwinge.homeip.net with QMQP; 28 Jan 2011 07:45:39 -0000 Received: (nullmailer pid 17405 invoked by uid 1000); Fri, 28 Jan 2011 07:45:39 -0000 From: Thomas Schwinge To: Carl Worth , notmuch@notmuchmail.org Subject: Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message. In-Reply-To: <87bp31oahy.fsf@yoom.home.cworth.org> References: <1296119841-496-1-git-send-email-thomas@schwinge.name> <87bp31oahy.fsf@yoom.home.cworth.org> User-Agent: Notmuch/0.5-33-g665f77b (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Fri, 28 Jan 2011 08:45:35 +0100 Message-ID: <874o8ttqsg.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Df-Sender: thomas@schwinge.name 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 Jan 2011 07:46:14 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hallo! On Fri, 28 Jan 2011 15:36:25 +1000, Carl Worth wrote: > On Thu, 27 Jan 2011 02:17:21 -0700, Thomas Schwinge wrote: > > + # Note that in the way we're setting it above and using it below, > > + # `additional_headers' will also serve as the header / body separa= tor > > + # (empty line in between). > I'd even prefer to have the newline explicitly in the HERE document, but > it's awkward to avoid having the "extra" newline at the end of > ${additional_headers} the way I'm constructing it incrementally. So just > documenting the current approach is probably best for now. Matches my thoughts :-) -- and as it occurs to me right now, doing it in one here document should be possible like this, if additional_headers is changed to have the newline *at the beginning* of the string: cat <"$gen_msg_filename" From: ${template[from]} To: ${template[to]} Message-Id: <${gen_msg_id}> Subject: ${template[subject]} Date: ${template[date]}${additional_headers} =20=20=20=20 ${template[body]} EOF Or, of course, we could split the here document: base header, conditionally (if set at all) additional_headers, new line, body. If you'd like me to prepare (and test) any of these, please tell. Gr=C3=BC=C3=9Fe, Thomas PS: Didn't know you'd be doing a presentation of notmuch at LCA2011 -- I saw your announcement on the IRC channel (re live stream) what it was too late already. But then, it would have been a rather inconvenient time / timezone anyways, being based in Germany. So, how has it been? --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1CdB8ACgkQFaWaPJ2HwAqv1gCbBtIMqTGRbJ5FCVrvHP4LGtKR dJQAnAsFLgeJkVZH0cWakQpIhqcHnYAt =+vui -----END PGP SIGNATURE----- --=-=-=--