Re: [Mailman-developers] Subject line, Re:, subject prefix (a small patch)
Ken Manheimer klm@cnri.reston.va.us writes:
Janne, can you recap your current thinking about the right thing to do about the "Re:" handling w.r.t. the subject line prefix? I gather we don't want to move the "Re:" to after the prefix, because it will interfere with some MUA's thread recognition - and given that, i don't see what more there is to be done...
I agree now that Re: should be in front of the prefix, just because of MUA's threading by the Subject: header. However, one Re: seems to be enough, in the sense that nobody (out of 600) on my list has required several Re:'s. Maybe the MUAs do only one-level threading?
Some MUAs add a Re: without caring any existing Re:'s.
In addition, it seems like some other MUAs (or subscribers) remove the prefix and everything before it, and add a RE:, maybe without caring about any existing Re:'s. What's happening is not completely clear to me, but anyway the result is that in longer threads I see subject lines like
Re: Re: PREFIX: RE: Re: So what is this all about?
This was with majordomo. When I run mailman with my patch, which does
if not subj:
msg.SetHeader('Subject', '%s(no subject)' % prefix)
else:
if re.match("(re:? *)*" + re.escape(prefix), subj, re.I):
# The subject prefix is there already, possibly with some Re:'s.
# Take the extra Re:'s away, leave one before the
prefix_mess_rx=re.compile('^(re:? *)*' +
re.escape(prefix) + '(re:? *)*', re.I)
subj=re.sub(prefix_mess_rx, 'Re: ' + prefix, subj)
else:
# No prefix yet.
subj=prefix+subj
msg.SetHeader('Subject', subj)
things seem much better. Now I have only three kind of subject lines:
PREFIX: So what is this all about?
Re: PREFIX: So what is this all about?
PREFIX: RE: So what is this all about?
As I said, I'm not sure how the third version appears.
My proposal is that roughly the following should be done to the Subject line:
- Remove extra Re:'s, case-insensitively, both before and after the possible prefix. Leave one Re: if there were any.
- The prefix should appear after the Re:, or first on the line if there aren't any Re:'s.
-- Janne
participants (1)
-
Janne Sinkkonen