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