]> diplodocus.org Git - nmh/blob - docs/historical/2.9BSD/man/pick.1
Added test of encoded Resent-To: and Resent-cc:.
[nmh] / docs / historical / 2.9BSD / man / pick.1
1 .TH PICK 1 "3 August 1983"
2 .UC 4
3 .SH NAME
4 pick \- select messages by content
5 .SH SYNOPSIS
6 .fc ^ ~
7 .ta .4i 1.8i
8 .nf
9 .in .5i
10 ^pick~^^\0\-cc~^ \%[\-src\ +folder] \%[msgs] \%[\-help] \%[\-scan] \%[\-noscan]
11 ^^^\0\-date~^ \%[\-show] \%[\-noshow] \%[\-nofile] \%[\-nokeep]
12 ^^^\0\-from~^
13 ^^^\s+2\b'\(lt\(bv\(bv\(lk\(bv\(bv\(lb'\s0 \-search~\s+2\b'\(rt\(bv\(bv\(rk\(bv\(bv\(rb'\s0^ pattern
14 ^^^\0\-subject~^
15 ^^^\0\-to~^ \%[\-file \%[\-preserve] \%[\-link] \%+folder\ ... \%[\-nopreserve] \%[\-nolink] ]
16 ^^^\0\-\-component~^ \%[\-keep \%[\-stay] \%[\-nostay] \%[+folder\ ...]\ ]
17 .fi
18 .fc
19
20 .re
21 .ti .5i
22 typically:
23 .in 1i
24 pick\0\-from\0jones\0\-scan
25 .br
26 pick\0\-to\0holloway
27 .br
28 pick\0\-subject\0ned\0\-scan\0\-keep
29 .SH DESCRIPTION
30 \fIPick\fR searches messages within a folder for the specified
31 contents, then performs several operations on the selected
32 messages.
33 .PP
34 A modified \fIgrep\fR(I) is used to perform the searching, so the
35 full regular expression (see \fIed\fR(I)) facility is available
36 within `pattern'.
37 With `\-search', pattern is used directly,
38 and with the others, the grep pattern constructed is:
39 .nf
40
41 .ti +.5i
42 \*(lq^component:\*.\*(**pattern\*(rq
43
44 .fi
45 This means that the pattern specified for a `\-search' will be
46 found everywhere in the message, including the header and the body,
47 while the other search requests are limited to the single
48 specified component.
49 The expression `\-\-component pattern'
50 is a shorthand for
51 specifying `\-search \*(lqcomponent:\*.\*(**pattern\*(rq\ '; it is used to pick
52 a component not in the set [cc date from subject to].
53 An
54 example is \*(lqpick \-\-reply\-to pooh \-show\*(rq.
55 .PP
56 Searching is performed on a per-line basis.
57 Within the header of
58 the message, each component is treated as one long line, but in
59 the body, each line is separate.
60 Lower-case letters in the
61 search pattern will match either lower or upper case in the
62 message, while upper case will match only upper case.
63 .PP
64 Once the search has been performed, the selected messages
65 are scanned (see \fIscan\fR) if the `\-scan' switch is given, and
66 then they are shown (see \fIshow\fR) if the `\-show' switch is
67 given.
68 After these two operations, the file operations (if
69 requested) are performed.
70 .PP
71 The `\-file' switch operates exactly like the \fIfile\fR command, with the
72 same meaning for the `\-preserve' and `\-link' switches.
73 .PP
74 The `\-keep' switch is similar to `\-file', but it produces a folder that
75 is a subfolder of the folder being searched and defines it as
76 the current folder (unless the `\-stay' flag is used).
77 This
78 subfolder contains the messages which matched the search
79 criteria.
80 All of the MH commands may be used with the sub-folder
81 as the current folder.
82 This gives the user considerable power
83 in dealing with subsets of messages in a folder.
84 .PP
85 The messages in a folder produced by `\-keep' will always have the
86 same numbers as they have in the source folder (i.e., the
87 `\-preserve' switch is automatic).
88 This way, the message
89 numbers are consistent with the folder from which the messages
90 were selected.
91 Messages are not removed from the source folder
92 (i.e., the `\-link' switch is assumed).
93 If a `+folder' is not
94 specified, the standard name \*(lqselect\*(rq will be used.
95 (This is the
96 meaning of \*(lq(select)\*(rq when it appears in the output of the
97 \fIfolder\fR command.) If `+folder' arguments are given to
98 `\-keep', they will be used rather than \*(lqselect\*(rq for the names
99 of the subfolders.
100 This allows for several subfolders to be
101 maintained concurrently.
102 .PP
103 When a `\-keep' is performed, the subfolder becomes the current folder.
104 This can be overridden by use
105 of the `\-stay' switch.
106 .PP
107 Here's an example:
108
109 .nf
110 \01 % folder +inbox
111 \02 inbox+ has 16 messages ( 3\- 22); cur= 3.
112 \03 % pick \-from dcrocker
113 \04 6 hits.
114 \05 [+inbox/select now current]
115 \06 % folder
116 \07 inbox/select+ has \06 messages ( 3\- 16); cur= 3.
117 \08 % scan
118 .ds p \\h'\\w'+'u'
119 \09 \03+ 6/20 Dcrocker Re: ned file update issue...
120 10 \06\*p 6/23 Dcrocker removal of files from /tm...
121 11 \08\*p 6/27 Dcrocker Problems with the new ned...
122 12 13\*p 6/28 d\h'\w'D'u-\w'd'u'crocker newest nned \*(<<I would ap...
123 13 15\*p 7/\05 Dcrocker nned \*(<<Last week I asked...
124 14 16\*p 7/\05 d\h'\w'D'u-\w'd'u'crocker message id format \*(<<I re...
125 15 % show all | print
126 16 [produce a full listing of this set of messages on the line printer.]
127 17 % folder \-up
128 18 inbox+ has 16 messages ( 3\- 22); cur= 3; (select).
129 19 % folder \-down
130 20 inbox/select+ has 6 messages ( 3\- 16); cur= 3.
131 21 % rmf
132 22 [+inbox now current]
133 23 % folder
134 24 inbox+ has 16 messages ( 3\- 22); cur= 3.
135 .fi
136
137 This is a rather lengthy example, but it shows the power of the
138 MH package.
139 In item 1, the current folder is set to inbox.
140 In 3,
141 all of the messages from dcrocker are found in inbox and linked
142 into the folder \*(lqinbox/select\*(rq.
143 (Since no action switch is
144 specified, `\-keep' is assumed.) Items 6 and 7 show that this
145 subfolder is now the current folder.
146 Items 8 through 14 are a
147 \fIscan\fR of the selected messages (note that they are all from dcrocker
148 and are all in upper and lower case).
149 Item 15 lists all of the messages to
150 the high-speed printer.
151 Item 17 directs \fIfolder\fR to set the
152 current folder to the parent of the selection-list folder, which
153 is now current.
154 Item 18 shows that this has been done.
155 Item 19 resets
156 the current folder to the selection list, and 21 removes the
157 selection-list folder and resets the current folder to the
158 parent folder, as shown in 22 and 23.
159 .SH FILES
160 .nf
161 .ta \w'$HOME/\*.mh\(ruprofile 'u
162 $HOME/\*.mh\(ruprofile The user profile
163 .fi
164 .SH "PROFILE COMPONENTS"
165 .nf
166 .ta \w'Current-Folder: 'u
167 Path: To determine the user's MH directory
168 Folder\-Protect: For protection on new folders
169 Current-Folder: To find the default current folder
170 .fi
171 .SH DEFAULTS
172 .nf
173 `\-src +folder' defaults to current
174 `msgs' defaults to all
175 `\-keep +select' is the default if no `\-scan', `\-show', or `\-file' is specified
176 .fi
177 .SH CONTEXT
178 If a `\-src +folder' is specified, it will
179 become the current folder, unless a `\-keep' with 0 or 1
180 folder arguments makes the selection-list subfolder the
181 current folder.
182 Each selection-list folder will have its
183 current message set to the first of the messages linked into
184 it unless the selection list already existed, in which case the
185 current message won't be changed.