FAQ about patches | More patches | Main Page

Fancy Thread Interface
Versions of pine for which the patch is available for: pine 4.43 pine 4.44

 
Pine 4.50 and newer versions of Pine, have included display of threads. You may be interested in the new patch for enhanced thread interface that adds some missing features not included in Pine's original implementation.
 
If you are unsure that you have the latest version of this patch, you can read the log of updates to this patch.
 
This is what the patch does and how it works.
 
Enter to the folder you want to see threaded index, and press k. This will make the index look like as below.
  PINE 4.XX THREAD INDEX  <Incoming-Folders> c-client  Msg 379 of 695     +

  379 May 23 Sean Witham      (3) Netscape problems with uw imapd          
  380 May 23 Mark Crispin         \-re: Netscape problems with uw imapd    
  381 May 24 Sean Witham            \-Re: Netscape problems with uw imapd  
  382 May 24 Kevin Dwyer      (3)     |-Re: Netscape problems with uw imapd
  383 May 24 Julian Hall              | \-Re: Netscape problems with uw ima
  384 May 24 Kevin Dwyer              |   \-Re: Netscape problems with uw i
  385 May 24 Mark Crispin     (3)     \-Re: Netscape problems with uw imapd
  386 May 25 Sean Witham                \-Re: Netscape problems with uw ima
  387 May 25 Mark Crispin                 \-Re: Netscape problems with uw i
If you press k agaih, the folder will be restored to the sort order it was before you put it in thread mode.
 
The numbers in parenthesis correspond to the number of messages (including that message) that are in the same branch.
 
  • If you want to collapse all threads, which will only display the first message of each thread, press Z (to zoom), if you want to uncollapse all threads press Z again.
     
    Here's a fuzzy part. Z is supposed to show only "selected" messages, so if you have some messages selected, pressing Z, may not do what you expect it to do. In this case, there's nothing that pressing Z one more time won't fix.
     
  • If you want to open a thread, press the ] key. If you want to close it, press [. If you press ] when the corresponfing thread is open the cursor will be put in the first message of the thread. The reason for this behavior is that otherwise it's possible to uncollapse thread and not seeing any change in the display of the screen, when there should be some. (e.g. if there are 3 selected messages in the screen in the zoomed index, and you open the thread corresponding to the first selected message, the parent of the thread may not show up in the screen, this is bad).
     
  • If you want to select a thread, press ^T in any message that is not selected in the thread. If you press ^T in a selected message, that will unselect the whole thread. If a thread is selected, then it is expanded and can not be collapsed, you can only collapse those messages in the thread that are not selected.
     
    This patch assumes that you have enabled [X] enable-aggregate-command-set in order to make some operations with threads. You can still select threads, but without this option you won't be able to apply operations on them.
     
  • If you want to delete a thread, press ^D in any message of the thread. If you want to undelete a thread, press ^U in any message of it. Pine will automatically advance to the next undeleted message if you have enabled the delete-skips-deleted configuration option.
     
  • If the indent string in threaded mode runs out of the screen, you can move the subject to the left by pressing ^A, and to the right by pressing ^E.
     
  • Any other kind of aggregate operations on threads should be done with a combination of these commands and the normal commands in Pine. (e.g to save a thread, first select it, then press "A S <foldername>".)
Now that you know the commands for threads: ^T, ^D, ^U, I will tell you the commands for branches. The logic for their names is as follows. The control key associated to selection, deletion or undeletion of branches is always close (in a "standard" keyboard) to the corresponding key that would do the job for threads. So for example,
  • The ^R key selects/unselects a branch in the same way that the ^T does it for threads. ^R is just next to ^T.
  • the ^X key marks a branch deleted (just below the ^D key).
  • The ^K key marks a branch undeleted (just below the ^U key).
  • The } and { keys open and close branches. They are not used to open threads, but branches. Notice that these are shift ] and shift [ with respect to the keys that open and close threads.
Those are all the commands that exist for handling threads. You can see them in the menu at the bottom of the screen in the index screen if you press O enough times.
 
You can also make the same thread above look in different ways, you can use the thread-index-format variable to indent the From field instead, so you can make the above thread look like:
  379 May 23 Netscape probl   (3) Sean Witham                              
  380 May 23 re: Netscape p       \-Mark Crispin                           
  381 May 24 Re: Netscape p         \-Sean Witham                          
  382 May 24 Re: Netscape p   (3)     |-Kevin Dwyer                        
  383 May 24 Re: Netscape p           | \-Julian Hall                      
  384 May 24 Re: Netscape p           |   \-Kevin Dwyer                    
  385 May 24 Re: Netscape p   (3)     \-Mark Crispin                       
  386 May 25 Re: Netscape p             \-Sean Witham                      
  387 May 25 Re: Netscape p               \-Mark Crispin                   
There's more documentation on how to set this variable in the help included with the patch which you can get to it, say, after you compile Pine and request help on that variable by putting the cursor over that variable in the configuration screen and pressing ?. In particular it is explained there that the default is that for collapsed threads, you may see a letter n or u in the first status column, if there's a New or Unread message under that collapsed thread that is not visible at the time.
 
You can also check the new configuration option:
[X] auto-fancy-thread-screen
which will cause that those folders sorted by default by thread will be opened in the Thread Index Screen, rather than in the normal index-screen.
 
Also notice that threads without parents will have a |> string in the indent-string of the thread, and they will collapse to the first message of the thread.
 
Here you can see how comp.mail.pine looks when using this patch.
 
Now you can sort threads in different ways. The algorithm used to sort by thread finds the threads, and the final step of it is to select the parent of each thread and sort them by date, and that's what you see finally in the screen. However sometimes it is useful to have those threads (or their parents) sorted by subject. Now you can sort threads by Subject and by Arrival. Sorting by arrival is defined in a way such that the thread with the newest message in it, is the last thread in the index, and so on (going up the index). Other sort orders (say by Size) have not been defined yet. You can set the order in which threads will be sorted in the configuration screen, look at the variable thread-sort-key variable. You can also set it from the command line if you start pine like
 
pine -threadsort <sort_method>

 
A new hidden configuration option called force-local-threading was added. This makes Pine compute the thead tree, instead of receiving it from the server. You should use this option only if you think that the server is not reporting threads correctly. The reason why it is a hidden configuration option is because this way of computing threads is very expensive in terms of bandwith and should be avoided, but if there's no other way to compute them correctly, then this may be a good idea, after all.
 
If you do not like the character \ for indenting, you can use the configuration variable thread-character to change it. All you need to do, is to enter the character that you want to use to indent threads. If you enter a string, only the first character of it will be used.
 
Send all comments and bug reports about this patch to me. Thanks, and enjoy!

Last Updated 09:57:25 PST Thu Dec 05 2002.