From: Thomas Schwinge <thomas@schwinge.name>
To: Carl Worth <cworth@cworth.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
Date: Fri, 28 Jan 2011 08:45:35 +0100 [thread overview]
Message-ID: <874o8ttqsg.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <87bp31oahy.fsf@yoom.home.cworth.org>
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
Hallo!
On Fri, 28 Jan 2011 15:36:25 +1000, Carl Worth <cworth@cworth.org> wrote:
> On Thu, 27 Jan 2011 02:17:21 -0700, Thomas Schwinge <thomas@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?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2011-01-28 7:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 9:17 [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message Thomas Schwinge
2011-01-27 11:32 ` Michal Sojka
2011-01-28 5:36 ` Carl Worth
2011-01-28 7:45 ` Thomas Schwinge [this message]
2011-01-28 13:24 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874o8ttqsg.fsf@kepler.schwinge.homeip.net \
--to=thomas@schwinge.name \
--cc=cworth@cworth.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).