Thread View: news.software.readers
3 messages
3 total messages
Started by Lem Novantotto
Tue, 13 Sep 2005 16:55
[DIALOG] Two scripts to avoid Subject cutting
Author: Lem Novantotto
Date: Tue, 13 Sep 2005 16:55
Date: Tue, 13 Sep 2005 16:55
84 lines
4279 bytes
4279 bytes
Hi!
With Dialog, if you reply to an article which has a subject like
(Re:) New subject (was: Old subj...)
the old subject is automatically cut off from your header, so you get:
Re: New subject.
I don't like this behaviour: IMHO there's no reason to change the Subject
twice, instead of once. Who sets his newsreader to break threads when their
Subjects change, can understand my reasons.
What about this workaround in two scripts? Please note that they don't
affect the threads panel (which is filled with the Subjects before, on the
XOver event). Besides, since the Subject is a mandatory header in news
articles (ie there must be exactly one Subject header in every article), I
haven't taken into account the event of its absence.
I think they are pretty self explanatory: whenever an article is saved, the
string "(was:" in its Subject, if present, is changed in "§was:" (which
seems to me a string strange enough). Whenever an article is posted, the
string "§was:" in its Subject, if present, is changed back in "(was:".
So, here they are:
program OnBeforeSavingMessage;
procedure OnBeforeSavingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean);
var
i: integer;
p: Longint;
Soggetto: string;
begin
if not IsEmail then begin
i := 0;
while copy (message[i], 1, 9) <> 'Subject: ' do i := i + 1;
p := pos ('(was:', message[i]);
if p > 0 then begin
Soggetto := message[i];
delete (Soggetto, p, 1);
insert ('§', Soggetto, p);
message[i] := Soggetto;
end; //end if p
end; //end if not IsEmail
end;
begin
end.
program OnBeforeSendingMessage;
function OnBeforeSendingMessage(var Message : TStringlist;
Servername : string;
IsEmail : boolean
):boolean;
var
i: integer;
p: Longint;
Soggetto: string;
begin
result := true;
if not IsEmail then begin
i := 0;
while copy (message[i], 1, 9) <> 'Subject: ' do i := i + 1;
p := pos ('§was:', message[i]);
if p > 0 then begin
Soggetto := message[i];
delete (Soggetto, p, 1);
insert ('(', Soggetto, p);
message[i] := Soggetto;
end; //end if p
end; //end if not IsEmail
end;
begin
end.
Corrections? Improvements? Comments? Ideas? Thanks in advance.
--
Bye, Lem
Informazioni su it.*: http://www.news.nic.it
Archivio news: http://groups.google.it/advanced_search?hl=it
Linee guida della netiquette: http://www.faqs.org/rfcs/rfc1855.html
Re: [DIALOG] Two scripts to avoid Subject cutting
Author: Korbinian Abenthum
Date: Wed, 14 Sep 2005 01:36
Date: Wed, 14 Sep 2005 01:36
22 lines
2244 bytes
2244 bytes
Lem Novantotto wrote: > With Dialog, if you reply to an article which has a subject like > (Re:) New subject (was: Old subj...) > the old subject is automatically cut off from your header, so you get: > Re: New subject. > > I don't like this behaviour: IMHO there's no reason to change the Subject > twice, instead of once. Who sets his newsreader to break threads when their > Subjects change, can understand my reasons. Hmm, I do in some groups. DIALOG knows that cutting of the "(was: " part is not a change of subject and thus does not break the thread apart. AFAIUI it's kind of standard (though I can't quote an RFC, if there is one) to append the old subject when changing it to smooth the transition, and cut it off in the follow-up to not clutter the subject header up in long threads. -- "Rhaegar fought valiantly, Rhaegar fought nobly, Rhaegar fought honorably. And Rhaegar died." (Jorah Mormont)
Re: [DIALOG] Two scripts to avoid Subject cutting
Author: Lem Novantotto
Date: Wed, 14 Sep 2005 10:37
Date: Wed, 14 Sep 2005 10:37
61 lines
4159 bytes
4159 bytes
Korbinian Abenthum ha scritto:
> Hmm, I do in some groups. DIALOG knows that cutting of the "(was: " part is
> not a change of subject and thus does not break the thread apart.
Dialog is fine, but I'm concerned about many other newsreaders.
> AFAIUI it's kind of standard (though I can't quote an RFC, if there is one)
> to append the old subject when changing it to smooth the transition,
Sure.
> and cut
> it off in the follow-up to not clutter the subject header up in long
> threads.
I see your point, but, to be honest, I still retain my former opinion.
Besides, I don't think that this has already become a true standard, anyhow
I don't think it's a blessed standard, at least for now.
>From http://www.ietf.org/internet-drafts/draft-ietf-usefor-useage-01.txt
[...]
As well as the addition of "Re: ", the Subject header MAY be refolded
(which MAY include collapsing/expanding whitespace to/from a single
SP at any point where the folding is changed). However, it MUST NOT
(except by deliberate act of the poster) be truncated, extended or
changed in any other way that might cause a reading agent to deduce
that the subject of a thread had changed.
[...]
I mean: no automatic changes, only deliberate.
Again, from http://www.faqs.org/faqs/usenet/software/good-netkeeping-seal/
[...]
b) Preserves the *entire* Subject of the original article. DO NOT
chop it off at 20 or 25 or even 80 characters. DO NOT append
spaces or any other characters to the end. DO NOT change the
case of any character in the original Subject; in particular, DO
NOT change the Subject to all-upper-case or all-lower-case.
[...]
I must admit that, at least, I would have been glad to be given a choice:
"cut it off" vs "don't cut it off".
BTW: there would have been an other "convention"[*], AFAIK never
implemented by anyone, :( related to subject changes: articles with a
changed Subject content should have had a special m-id: <idleft_-_@idright>
(note the "_-_" just before the "@"). This would have been very useful even
when trimming a too long References header (the first reference, the last
three references, any reference mentioned in the body, *and* the reference
of every article in which the subject changed should be preserved).
[*] From the old "son-of-1036".
Thank you for your comment. :)
--
Bye, Lem
Informazioni su it.*: http://www.news.nic.it
Archivio news: http://groups.google.it/advanced_search?hl=it
Linee guida della netiquette: http://www.faqs.org/rfcs/rfc1855.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads