head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2006.05.29.14.31.25; author jpeek; state Exp; branches; next 1.3; 1.3 date 2006.05.28.04.27.15; author jpeek; state Exp; branches; next 1.2; 1.2 date 2006.05.26.23.59.01; author jpeek; state Exp; branches; next 1.1; 1.1 date 2006.05.26.22.12.07; author jpeek; state Exp; branches; next ; desc @mh-e_43.html page from mh-e section of "MH & nmh: Email for Users & Programmers" @ 1.4 log @Removed 'html/' from end of http://mh-e.sourceforge.net/manual/html/ URLs @ text @ BOOK MOVED: mh-e - Searching

BOOK MOVED: mh-e - Searching

This section of MH & nmh: Email for Users & Programmers is now the MH-E Manual. It's moved to http://mh-e.sourceforge.net/manual/.

If you aren't taken to the new site in 15 seconds, please click on the link above.

You may also want to visit:


Last change $Date: 2006/05/28 04:27:15 $
Suggestions are welcome: Bill Wohler <wohler@@newt.com>
@ 1.3 log @removed 'Tour-Through-MH_002dE.html' from end of http://mh-e.sourceforge.net/manual/html/ @ text @d4 1 a4 1 content="15;URL=http://mh-e.sourceforge.net/manual/html/"> d15 2 a16 2 href="http://mh-e.sourceforge.net/manual/html/"> http://mh-e.sourceforge.net/manual/html/. d39 1 a39 1 Last change $Date: 2006/05/26 23:59:01 $ @ 1.2 log @Replaced with page pointing people to new MH-E Manual @ text @d4 1 a4 1 content="15;URL=http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html"> d15 2 a16 2 href="http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html"> http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html. d39 1 a39 1 Last change $Date: 2006/05/26 22:12:05 $ @ 1.1 log @Original version from Feb 19 2001 @ text @d3 2 d7 39 a45 154 mh-e - Searching Go to the first, previous, next, last section, table of contents.


Searching Through Messages

You can search a folder for messages to or from a particular person or about a particular subject. In fact, you can also search for messages containing selected strings in any arbitrary header field or any string found within the messages. Use the M-s (mh-search-folder) command. You are first prompted for the name of the folder to search and then placed in the following buffer in MH-Pick mode:

From: #
To:
Cc:
Date:
Subject:
--------

--**-Emacs: pick-pattern    (MH-Pick)------All----------------------------

Pick window

Edit this template by entering your search criteria in an appropriate header field that is already there, or create a new field yourself. If the string you're looking for could be anywhere in a message, then place the string underneath the row of dashes. The M-s command uses the MH command pick to do the real work, so read pick(1) to find out more about how to enter the criteria.

There are no semantics associated with the search criteria--they are simply treated as strings. Case is ignored when all lowercase is used, and regular expressions (a la ed) are available. It is all right to specify several search criteria. What happens then is that a logical and of the various fields is performed. If you prefer a logical or operation, run M-s multiple times.

As an example, let's say that we want to find messages from Ginnean about horseback riding in the Kosciusko National Park (Australia) during January, 1994. Normally we would start with a broad search and narrow it down if necessary to produce a manageable amount of data, but we'll cut to the chase and create a fairly restrictive set of criteria as follows:

From: ginnean
To:
Cc:
Date: Jan 1994
Subject: horse.*kosciusko
--------

As with MH-Letter mode, MH-Pick provides commands like C-c C-f C-t to help you fill in the blanks.

C-c C-f C-t
Move to `To:' header field (mh-to-field).
C-c C-f C-c
Move to `cc:' header field (mh-to-field).
C-c C-f C-s
Move to `Subject:' header field (mh-to-field).
C-c C-f C-f
Move to `From:' header field (mh-to-field).
C-c C-f C-b
Move to `Bcc:' header field (mh-to-field).
C-c C-f C-f
Move to `Fcc:' header field (mh-to-field).
C-c C-f C-d
Move to `Dcc:' header field (mh-to-field).
C-c C-c
Execute the search (mh-do-pick-search).

To perform the search, type C-c C-c (mh-do-pick-search). The selected messages are placed in the search sequence, which you can use later in forwarding (see section Forwarding Mail), printing (see section Printing Your Mail), or narrowing your field of view (see section Using Sequences). Subsequent searches are appended to the search sequence. If, however, you wish to start with a clean slate, first delete the search sequence (how to do this is discussed in section Using Sequences).

If you're searching in a folder that is already displayed in a MH-Folder buffer, only those messages contained in the buffer are used for the search. Therefore, if you want to search in all messages, first kill the folder's buffer with C-x k or scan the entire folder with M-r.


Go to the first, previous, next, last section, table of contents. @