nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] A script for threading

2006-02-07 07:47:58
Instead of creating, multiple sequences, I use a script which just
creates a single sequence given a message number to start with. It's a
zsh function I'm afraid. Cut down to the essentials, it is as follows:

  local -a msgs refer ref rep mid
  msgs=( ${@:-cur} )

  ref=( $(scan -width 2048 -format '%{in-reply-to} %{references}' $msgs) )
  mid=( $(scan -width 256 -format '%{message-id}' $msgs) )

  (( $#ref )) && refer=( '--message-id '$^ref )
  (( $#mid )) && refer+=( '--references '$^mid  '--message-id '$^mid
      '--in-reply-to '$^mid )

  pick ${=${(j: -or :)refer}}

As far as I can see, this doesn't handle the situation where none
of the messages have References: and instead you have to a follow a chain
of In-Reply-To:. That's the sort of thing which makes threading
non-trivial.

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>