[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] A script for threading

From: Oliver Kiddle
Subject: Re: [Nmh-workers] A script for threading
Date: Tue, 07 Feb 2006 12:14:14 +0100

Paul Fox wrote:
> it occurred to me yesterday that this script might be quite
> useful (instead of just pretty :-) if it had one simple feature: 
> the ability to add each thread to a separate, temporary, mh
> sequence ("t1", "t2", "t3", ...).  the output would then include

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}}

Handling common subjects is a bit more messy because this relies on
doing word-splitting which would cut a typical subject field into many

We could perhaps add a -thread option to pick which does this.


This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]