Re: Replying to multiple mails
Hi,
* Anders Helmersson wrote:
In the changeset 5457 the behavior when answering to multiple mails was
changed so that only one message id is included in the In-Reply-To list.
Up to ten message id can be included in the References list.
http://dev.mutt.org/hg/mutt/rev/7729b1ad530c
changeset: 5457:7729b1ad530c
branch: HEAD
tag: tip
user: Aron Griffis <agriffis@xxxxxxxxx>
date: Thu Jul 10 09:38:25 2008 -0400
summary: Unify mutt_write_references
I don't know if this was the intention. You can still tag a couple of
messages and reply to them. The References field becomes correct, but
the In-Reply-To does not.
Hmm, I think since mutt supports extracting several message-ids out of
In-Reply-To, it should also support writing them. So yes, this should be
fixed.
The first one changes the number of In-Reply-To members to five (rather
arbitrary).
Hmm, 5 is still rather arbitrary. How about a replacing these magic
numbers with #define'd constants? I don't think it won't do any harm
using 10 for References and In-Reply-To. Since we have so few callers,
we could turn the trim counter into a flag which can be OR'ed with a
to-be-added flag for doing verbatim copy (see below) and use the magic
number in mutt_write_references instead.
#define REF_TRIM_COUNT 10
#define F_TRIM_REF (1<<0)
#define F_TRIM_DUP (1<<1)
int mutt_write_references(LIST* r, FILE* f, int flags) {
int trim = (flags & F_TRIM_REF) ? REF_TRIM_COUNT : 0;
...
if ((flags & F_TRIM_DUP)) {
/* remove dupes */
}
}
The second patch removes duplicated members in the References field.
The third patch employs mutt_write_references when copying the
In-Reply-To list.
I'm not entirely sure about these since when we copy a message, we now
do a verbatim copy without mangling the content but duplicate removal
would actually alter the content. I don't really know if it matters
much, but I think we want a flag for mutt_write_references to tell it
whether to remove duplicates or not and pass a 1 from within copy.c and
a 0 from sendlib.c.
The fourth patch puts the new-line into mutt_write_references in the
same way as mutt_write_address_list does.
Regards, Rocco