Using Pick

[previous] [next] [table of contents] [index]

Let's take another look at the Pick command on the Sequence menu. (The Section Searching for Messages introduced Pick.) It lets you search for messages by any field in the header, any word(s) in the body, or a combination of these. It's a flexible and powerful way to find messages.

A Pick Example

When you use Pick, a window like the Figure below opens (by default, it's on top of the main xmh window; I've moved it to the side so you can see both).

To select messages, point to one of the boxes by a field name and type what you want to search for. For example, to find messages from nathan, point to the From: box and type nathan.

Figure: Main and Pick windows

maanpiwi.gif

In the Figure above, I wanted to find messages which were sent to either the mh-users or mh-workers mailing lists). I pointed to the To: box and typed mh-users. Then, I clicked the Or button next to the window; another box opened, where I typed mh-workers. Because I left the other boxes blank, Pick ignored those fields. If I had filled in one (or more) of them, Pick would have found only messages that fit all the criteria -- for instance, if I had also put the word bug in the Search: box, Pick would have selected only messages to mh-users or mh-workers which contained the word "bug."

Remember that, in some cases, messages may be sent to an address via the To: field or the cc: field. You wouldn't want to type those addresses in the Cc: boxes of the Figure above, though, because the address would have to be listed in both the To: and cc: fields to be matched. In this case, you want the "big -Or-" button.

By default, the Pick window creates a sequence named temp. That sequence is normally reused each time you use Pick. Because I want to keep this sequence for awhile, I changed its name to mailquestions.

Sequence names can be alphabetic characters (letters) only -- if you use an invalid name, xmh won't define the sequence; you'll see a dialog box with an error from the MH pick command.

When I click OK, the Pick window closes. The main window's Table of Contents title changes to project:mailquestions, and the list shows the messages in the sequence. There'll also be an entry on the Sequence menu for the mailquestions sequence. See the Figure below.

Figure: Main window after picking mailquestions sequence

mawapims.gif

When you're done looking at the sequence, you can select another existing sequence by selecting the name on the Sequence menu, then using Open Sequence. The mailquestions sequence entry will remain, and MH will "remember" the messages in the sequence. Or, you can add and delete messages from a sequence -- see the Section Modifying Sequences.

Using the Big -Or- Button

Pick lets you make much more complicated searches. For example, to find messages from john to alison or from mona to zelda (but not from john to zelda or mona to alison), you would use the big -Or- button at the lower-left corner of the Pick area. This makes a duplicate of all the From:, To:, etc. boxes below the first set and puts scrollbars on the area. I've filled in the names. The Figure below shows this (I've dragged down the grip to show the important parts).

Figure: Pick window after big -Or- clicked in top area

pwabocta.gif

Find Other Fields, Skip Fields

The Pick and Skip buttons choose whether messages should or should not match the search string you type. All the examples so far have used the Pick buttons. But if you click the Skip button next to a field, it tells xmh to find messages which do not match that field.

The box with a blank field name lets you specify another header field besides From:, To:, and so on. For instance, to search for all messages which had the following field:

Reply-To: jerryu
in the header, you'd fill in the blank field-name box as shown in the Figure below. (These messages might be ones that jerryu sent from angelac's account.) The window in that figure would match all messages from the angelac account that have a Reply-to: jerryu field in the header -- except messages sent on January 24, 1993.

Figure: Example of Pick skip button

expiskbu.gif

Unfortunately, the format of the date you type in the Date: box must match the message exactly. (The Date range: boxes don't have this problem.) As we get closer to the year 2000, more mailers are converting from the old two-digit year format (like 93 for 1993) to using all four digits. So, if you can't use the Date range: boxes, it's safest to type the date with both formats. I did that in the Figure above.

Bottom Area of the Pick Window

The bottom area of the Pick window isn't used too often, but it's good to know about. Here are some of its features:

xmh will put a horizontal scrollbar above this area if it's too wide to fit in the window.

[Table of Contents] [Index] [Previous: Introduction to Sequences] [Next: Modifying Sequences]


Last change $Date: 1996/06/06 15:14:51 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>