Hallo! On Fri, 28 Jan 2011 15:36:25 +1000, Carl Worth <cwo...@cworth.org> wrote: > On Thu, 27 Jan 2011 02:17:21 -0700, Thomas Schwinge <tho...@schwinge.name> > wrote: > > + # Note that in the way we're setting it above and using it below, > > + # `additional_headers' will also serve as the header / body separator > > + # (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 <<EOF >"$gen_msg_filename" From: ${template[from]} To: ${template[to]} Message-Id: <${gen_msg_id}> Subject: ${template[subject]} Date: ${template[date]}${additional_headers} ${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üße, 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?
pgpKO5IrlXe81.pgp
Description: PGP signature
_______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch