]> diplodocus.org Git - nmh/blob - man/folder.man
Fixed mhshow part markers when displaying multiple messages.
[nmh] / man / folder.man
1 .TH FOLDER %manext1% 2016-08-29 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 folder, folders \- set/list current nmh folder/message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B folder
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RI [ +folder ]
14 .RI [ msg ]
15 .RB [ \-all " | " \-noall ]
16 .RB [ \-create " | " \-nocreate ]
17 .RB [ \-fast " | " \-nofast ]
18 .RB [ \-header " | " \-noheader ]
19 .RB [ \-recurse " | " \-norecurse ]
20 .RB [ \-total " | " \-nototal ]
21 .RB [ \-list " | " \-nolist ]
22 .RB [ \-push " | " \-pop ]
23 .RB [ \-pack " | " \-nopack ]
24 .RB [ \-print " | " \-noprint ]
25 .RB [ \-verbose " | " \-noverbose ]
26 .HP 5
27 .B folders
28 is equivalent to
29 .B folder
30 .B \-all
31 .ad
32 .SH DESCRIPTION
33 When
34 .B folder
35 is given the
36 .B \-print
37 switch (the default), it lists: the current folder, the number
38 of messages in it and their range (low-high), the folder's
39 current message, and an indication of extra files, if any.
40 For example:
41 .PP
42 .RS 5
43 .nf
44 .ta \w'/rnd/phyl/Mail/EP 'u +\w'has ddd messages 'u +\w'(ddd\-ddd); 'u
45 inbox+ has \016 messages (\0\03\-\022); cur=\0\05.
46 .fi
47 .RE
48 .PP
49 If a
50 .I +folder
51 and/or
52 .I msg
53 are specified, they will become the current folder and/or message.
54 (When a
55 .I +folder
56 argument is given, this corresponds to a \*(lqcd\*(rq operation
57 in the shell; when no
58 .I +folder
59 argument is given, this corresponds roughly to a \*(lqpwd\*(rq
60 operation in the shell.) If
61 .B \-noprint
62 is specified, a
63 .I +folder
64 and/or
65 .I msg
66 may still be specified to set the current folder and/or message,
67 but the folder summary will not be printed.
68 .PP
69 If the specified (or default) folder doesn't exist,
70 .B folder
71 will ask the user if the folder should be created; when
72 standard input is not a tty, the answer is assumed to be
73 \*(lqyes\*(rq.
74 The
75 .B \-create
76 switch tells
77 .B folder
78 to create new folders without query.
79 (This is an easy way to create an empty folder for later use.)
80 Specifying
81 .B \-nocreate
82 will cause
83 .B folder
84 to print an error message and exit without creating a folder.
85 .SS "Multiple Folders"
86 Specifying
87 .B \-all
88 will produce a summary line for each top-level folder in the user's
89 .B nmh
90 directory, sorted alphabetically. (If
91 .B folder
92 is invoked by a name ending with \*(lqs\*(rq (e.g.
93 .BR folders ),
94 .B \-all
95 is assumed.) Specifying
96 .B \-recurse
97 with
98 .B \-all
99 will include a line for all sub-folders.
100 These folders are all preceded by any read-only folders, which occur as
101 .RI \*(lq atr\-cur\- \*(rq
102 entries in the user's
103 .B nmh
104 context. For example:
105 .PP
106 .RS 5
107 .nf
108 .ta \w'/rnd/phyl/Mail/EP 'u +\w'has ddd messages 'u +\w'(ddd\-ddd); 'u
109 FOLDER \0\0\0\0\0\0# MESSAGES RANGE CUR (OTHERS)
110 /var/work/folder has \035 messages (\01\-\035); cur=23.
111 /usr/bugs/Mail has \082 messages (\01\-108); cur=82.
112 ff has \0no messages.
113 inbox+ has \016 messages (\03\-\022); cur=\05.
114 mh has \076 messages (15\-\076); cur=70.
115 notes has \0\02 messages (\01\-\0\02); cur=\01.
116 ucom has 124 messages (\01\-124); cur=\06; (others).
117 .ta \w'/rnd/phyl/Mail/EP has 'u
118 TOTAL = 339 messages in 7 folders
119 .fi
120 .RE
121 .PP
122 The \*(lq+\*(rq after
123 .I inbox
124 indicates that it is the current folder.
125 The \*(lq(others)\*(rq indicates that the folder
126 .I ucom
127 contains files which aren't messages;
128 these may either be sub-folders, or files that
129 don't belong under the
130 .B nmh
131 file naming scheme.
132 .PP
133 The header is output if either the
134 .B \-all
135 or
136 .B \-header
137 switches are specified. It is suppressed by
138 .BR \-noheader .
139 .PP
140 The folder and message totals are output if either the
141 .B \-all
142 or
143 .B \-total
144 switches are specified. They are suppressed by
145 .BR \-nototal .
146 .PP
147 If
148 .B \-fast
149 is given, only the folder name (or names, in the case of
150 .BR \-all )
151 will be listed.
152 (This is faster because the folders need not be read.)
153 .PP
154 If a
155 .I +folder
156 is given with the
157 .B \-all
158 switch,
159 .B folder
160 will, in addition to setting the current folder, list the top-level
161 sub-folders for the current folder (with
162 .BR \-norecurse )
163 or list all sub-folders under the current folder recursively (with
164 .BR \-recurse ).
165 .PP
166 If
167 .I msg
168 is supplied, together with
169 .I +folder
170 or without
171 .BR \-all ,
172 it will become the current message of
173 .I +folder
174 (if it had been supplied)
175 or the current folder.
176 .PP
177 The
178 .B \-recurse
179 switch lists each folder recursively, so its use effectively
180 defeats the speed enhancement of
181 .BR \-fast ,
182 since each folder must be searched for sub-folders.
183 Nevertheless, the combination of these options is useful.
184 .SS "Compacting a Folder"
185 The
186 .B \-pack
187 switch will compress the message names in the designated folders,
188 removing holes in message numbering. The
189 .B \-verbose
190 switch directs
191 .B folder
192 to tell the user the general actions it is taking to compress the folder.
193 .SS "The Folder Stack"
194 The
195 .B \-push
196 switch directs
197 .B folder
198 to push the current folder
199 onto the
200 .IR folder-stack ,
201 and make the
202 .I +folder
203 argument the current folder. If
204 .I +folder
205 is not given, the current folder and the
206 top of the
207 .I folder-stack
208 are exchanged. This corresponds to the
209 \*(lqpushd\*(rq operation in the shell.
210 .PP
211 The
212 .B \-pop
213 switch directs
214 .B folder
215 to discard the top of the
216 .IR folder-stack ,
217 after setting the current folder to that value.
218 No
219 .I +folder
220 argument is allowed. This corresponds to the \*(lqpopd\*(rq
221 operation in the shell. The
222 .B \-push
223 and
224 .B \-pop
225 switches are mutually exclusive: the last occurrence of either one
226 overrides any previous occurrence of the other.
227 The use of either of these switches also sets
228 .BR \-list ,
229 by default.
230 .PP
231 The
232 .B \-list
233 switch directs
234 .B folder
235 to list the
236 .IR folder-stack .
237 No
238 .I +folder
239 argument is allowed. After a successful
240 .B \-push
241 or
242 .BR \-pop ,
243 the
244 .B \-list
245 action is taken, unless a
246 .B \-nolist
247 switch follows them on the command line. This corresponds
248 to the \*(lqdirs\*(rq operation in the shell. The
249 .BR \-push ,
250 .BR \-pop ,
251 and
252 .B \-list
253 switches disable the default
254 .B \-print
255 behavior.
256 .SH FILES
257 .TP 20
258 $HOME/.mh_profile
259 The user's profile.
260 .SH "PROFILE COMPONENTS"
261 .PD 0
262 .TP 20
263 Path:
264 To determine the user's nmh directory.
265 .TP
266 Current\-Folder:
267 To find the default current folder.
268 .TP
269 Folder\-Protect:
270 To set mode when creating a new folder.
271 .TP
272 Folder\-Stack:
273 To determine the folder stack.
274 .\" ^lsproc:~^Program to list the contents of a folder
275 .PD
276 .SH "SEE ALSO"
277 .IR mhpath (1),
278 .IR refile (1),
279 .IR rmf (1)
280 .SH DEFAULTS
281 .PD 0
282 .TP 20
283 +folder
284 The current folder.
285 .TP
286 msg
287 \*(lqnone\*(rq
288 .TP
289 \-nofast
290 .TP
291 \-noheader
292 .TP
293 \-nototal
294 .TP
295 \-nopack
296 .TP
297 \-norecurse
298 .TP
299 \-noverbose
300 .TP
301 \-print
302 is the default if none of
303 .BR -list ,
304 .BR \-push ,
305 or
306 .B \-pop
307 are specified.
308 .TP
309 \-list
310 is the default if
311 .BR \-push ,
312 or
313 .B \-pop
314 is specified.
315 .PD
316 .SH CONTEXT
317 If
318 .I +folder
319 and/or
320 .I msg
321 are given, they will become the current folder and/or message.
322 .SH BUGS
323 There is no way to restore the default behavior
324 (to ask the user whether to create a non-existent folder)
325 after
326 .B \-create
327 or
328 .B \-nocreate
329 is given.