nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] A script for threading

2006-01-16 19:49:28
it seems to work.  having now given it a spin (so to speak), it occurs
to me that i'm not sure what it's for.  it gives me a scan-like listing
of the selected messages, showing related threads.  but it doesn't let
me preserve or use that ordering  -- i can't read a thread in order,
can i?  am i missing something?  of course, i'm not sure how any mh
threading interface would, or should, work in practice.

Exactly. I haven't tried to solve that problem, but to make it easier to
experiment with solutions. The output routine of the script can be
easily altered to sort the overall folder by a call to refile for each
message (which is very slow) or to create sequences (which would be quick).
One idea I came up with is to create sequences of the form
thread.5.2.3
where that sequence would have all the messages which are replies to
the third reply to the second reply to the fifth root message in the
folder. Since sequences are relatively easy to work with, scripts for
doing up, down, nextinthread, and so forth would probably only be about
two or three lines each.

Another (mad) possibility is to create a subfolder structure which mirrors
the threading. This is also relatively easy to do from the output
routine, but I don't like it because it preserves too much state.
Threading, by nature, is not stable. A new message introduced to the folder
can substantially change the way other messages are threaded, which is
very unlike sorting. Not only that, but the enormous variation in
poorly formed references and in-reply-to headers out there means that
there is a lot of guesswork involved. Consequently, I believe threading
should be done as dynamically as possible. It's not a computationally slow
procedure anyway. Linear in the number of messages, I think. The bottleneck
is in parsing all the messages for their headers.

Cheers,

        - Joel


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>