/[emacs]/emacs/lisp/mh-e/mh-pick.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-pick.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by lute, Thu May 26 15:21:29 2005 UTC revision 1.9 by wohler, Sat May 28 22:04:54 2005 UTC
# Line 1  Line 1 
1  ;;; mh-pick.el --- make a search pattern and search for a message in MH-E  ;;; mh-pick.el --- make a search pattern and search for a message in MH-E
2    
3  ;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.  ;; Copyright (C) 1993, 1995,
4    ;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
5    
6  ;; Author: Bill Wohler <wohler@newt.com>  ;; Author: Bill Wohler <wohler@newt.com>
7  ;; Maintainer: Bill Wohler <wohler@newt.com>  ;; Maintainer: Bill Wohler <wohler@newt.com>
# Line 52  Line 53 
53  ;;;###mh-autoload  ;;;###mh-autoload
54  (defun mh-search-folder (folder window-config)  (defun mh-search-folder (folder window-config)
55    "Search FOLDER for messages matching a pattern.    "Search FOLDER for messages matching a pattern.
56  This function uses the MH command `pick' to do the work.  
57  Add the messages found to the sequence named `search'.  With this command, you can search a folder for messages to or from a
58  Argument WINDOW-CONFIG is the current window configuration and is used when  particular person or about a particular subject. In fact, you can also search
59  the search folder is dismissed."  for messages containing selected strings in any arbitrary header field or any
60    string found within the messages.
61    
62    You are first prompted for the name of the folder to search and then placed in
63    the following buffer in MH-Pick mode:
64    
65         From:
66         To:
67         Cc:
68         Date:
69         Subject:
70         --------
71    
72    Edit this template by entering your search criteria in an appropriate header
73    field that is already there, or create a new field yourself. If the string
74    you're looking for could be anywhere in a message, then place the string
75    underneath the row of dashes. The \\[mh-search-folder] command uses the MH
76    command \"pick\" to do the real work.
77    
78    There are no semantics associated with the search criteria--they are simply
79    treated as strings. Case is ignored when all lowercase is used, and regular
80    expressions (a la \"ed\") are available. It is all right to specify several
81    search criteria. What happens then is that a logical _and_ of the various
82    fields is performed. If you prefer a logical _or_ operation, run
83    \\[mh-search-folder] multiple times.
84    
85    As an example, let's say that we want to find messages from Ginnean about
86    horseback riding in the Kosciusko National Park (Australia) during January,
87    1994. Normally we would start with a broad search and narrow it down if
88    necessary to produce a manageable amount of data, but we'll cut to the chase
89    and create a fairly restrictive set of criteria as follows:
90    
91         From: ginnean
92         To:
93         Cc:
94         Date: Jan 1994
95         Subject: horse.*kosciusko
96         --------
97    
98    As with MH-Letter mode, MH-Pick provides commands like
99    \\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks.
100    
101    To perform the search, type \\[mh-do-search]. The selected messages are placed
102    in the \"search\" sequence, which you can use later in forwarding, printing,
103    or narrowing your field of view. Subsequent searches are appended to the
104    \"search\" sequence. If, however, you wish to start with a clean slate, first
105    delete the \"search\" sequence.
106    
107    If you're searching in a folder that is already displayed in an MH-Folder
108    buffer, only those messages contained in the buffer are used for the search.
109    Therefore, if you want to search in all messages, first kill the folder's
110    buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder
111    with \\[mh-rescan-folder].
112    
113    If you find that you do the same thing over and over when editing the search
114    template, you may wish to bind some shortcuts to keys. This can be done with
115    the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is
116    run on a new pattern.
117    
118    If you have run the \\[mh-index-search] command, but change your mind while
119    entering the search criteria and actually want to run a regular search, then
120    you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command.
121    
122    In a program, argument WINDOW-CONFIG is the current window configuration and
123    is used when the search folder is dismissed."
124    (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t)    (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t)
125                       (current-window-configuration)))                       (current-window-configuration)))
126    (let ((pick-folder (if (equal folder "+") mh-current-folder folder)))    (let ((pick-folder (if (equal folder "+") mh-current-folder folder)))

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26