* [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
@ 2011-01-27 9:17 Thomas Schwinge
2011-01-27 11:32 ` Michal Sojka
2011-01-28 5:36 ` Carl Worth
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Schwinge @ 2011-01-27 9:17 UTC (permalink / raw)
To: notmuch; +Cc: Thomas Schwinge
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
---
test/test-lib.sh | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh
index d179426..f536172 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -351,8 +351,11 @@ ${additional_headers}"
${additional_headers}"
fi
+ # 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).
-cat <<EOF >"$gen_msg_filename"
+ cat <<EOF >"$gen_msg_filename"
From: ${template[from]}
To: ${template[to]}
Message-Id: <${gen_msg_id}>
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
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
1 sibling, 0 replies; 5+ messages in thread
From: Michal Sojka @ 2011-01-27 11:32 UTC (permalink / raw)
To: Thomas Schwinge, notmuch; +Cc: Thomas Schwinge
On Thu, 27 Jan 2011, Thomas Schwinge wrote:
> Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
> ---
> test/test-lib.sh | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index d179426..f536172 100755
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -351,8 +351,11 @@ ${additional_headers}"
> ${additional_headers}"
> fi
>
> + # 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).
Yes, this will definitely help the future readers of this code. Thanks.
-Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
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
1 sibling, 1 reply; 5+ messages in thread
From: Carl Worth @ 2011-01-28 5:36 UTC (permalink / raw)
To: Thomas Schwinge, notmuch; +Cc: Thomas Schwinge
[-- Attachment #1: Type: text/plain, Size: 628 bytes --]
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).
Thanks, Thomas.
I've merged this now.
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.
-Carl
--
carl.d.worth@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
2011-01-28 5:36 ` Carl Worth
@ 2011-01-28 7:45 ` Thomas Schwinge
2011-01-28 13:24 ` Carl Worth
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Schwinge @ 2011-01-28 7:45 UTC (permalink / raw)
To: Carl Worth, notmuch
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
2011-01-28 7:45 ` Thomas Schwinge
@ 2011-01-28 13:24 ` Carl Worth
0 siblings, 0 replies; 5+ messages in thread
From: Carl Worth @ 2011-01-28 13:24 UTC (permalink / raw)
To: Thomas Schwinge, notmuch
[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]
On Fri, 28 Jan 2011 08:45:35 +0100, Thomas Schwinge <thomas@schwinge.name> wrote:
> 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:
...
> Date: ${template[date]}${additional_headers}
>
> ${template[body]}
That looks quite reasonable. I hadn't thought of that one myself.
> If you'd like me to prepare (and test) any of these, please tell.
Please feel free! I would appreciate it.
> 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?
I probably could have done a better job of letting people know that I
would be giving a talk. But then again, there wasn't that much in the
talk that people who read this list regularly don't already know[*].
For anyone interested, a video of the talk should be appearing on
http://linux.conf.au at some point.
The talk went fairly well, I think. But I spent a bit too much at the
beginning just explaining why we need notmuch, so I didn't have enough
time at the end to really show off notmuch well. And I didn't have the
demonstration portions of the talk as rehearsed as I should have, so
some parts of it were not smooth.
Ah well, I'll get better for the next talk.
-Carl
[*] Then again, Eric works right next to me two days a week and uses
exclusively notmuch for email; as we were attending the conference
together this week I mentioned two features in conversation with others
and he said, "What!? Notmuch can do that?! That's awesome". So that was
fun.
I think the two features were tab completion of tag names (which is a
really old feature by now) and the display of an error message if a pipe
fails (which is a fairly new feature).
--
carl.d.worth@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-28 13:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-01-28 13:24 ` Carl Worth
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).