5 .\" include the -mh macro file
8 .TH FOLDER %manext1% MH.6.8 [%nmhversion%]
10 folder, folders \- set/list current folder/message
18 \%[\-create] \%[\-nocreate]
19 \%[\-fast] \%[\-nofast]
21 \%[\-header] \%[\-noheader]
25 \%[\-total] \%[\-nototal]
26 \%[\-list] \%[\-nolist]
29 \%[\-pack] \%[\-nopack]
38 folders is equivalent to folder -all
42 Since the \fInmh\fR environment is the shell, it is easy to lose track
43 of the current folder from day to day. When \fIfolder\fR is given the
44 `\-print' switch (the default), \fIfolder\fR will list the current folder,
45 the number of messages in it, the range of the messages (low\-high),
46 and the current message within the folder, and will flag extra files if
47 they exist. An example of this summary is:
51 .ta \w'/rnd/phyl/Mail/EP 'u +\w'has ddd messages 'u +\w'(ddd\-ddd); 'u
52 inbox+ has \016 messages (\0\03\-\022); cur=\0\05.
57 If a `+folder' and/or `msg' are specified, they will become the current
58 folder and/or message. By comparison, when a `+folder' argument is given,
59 this corresponds to a \*(lqcd\*(rq operation in the \fIshell\fR; when no
60 `+folder' argument is given, this corresponds roughly to a \*(lqpwd\*(rq
61 operation in the \fIshell\fR.
63 If the specified (or default) folder doesn't exist, the default action
64 is to query the user as to whether the folder should be created; when
65 standard input is not a tty, the answer to the query is assumed to be
68 Specifying `\-create' will cause \fIfolder\fP to create new folders
69 without any query. (This is the easy way to create an empty folder for
70 use later.) Specifying `\-nocreate' will cause \fIfolder\fP to exit
71 without creating a non-existant folder.
73 .\" note - this doesn't work at present
74 .\" If `\-noprint' is specified,
75 .\" a `+folder' and/or `msg' may still be specified
76 .\" to set the current folder and/or message,
77 .\" but the folder summary will not be printed.
78 .Uh "Multiple Folders"
79 Specifying `\-all' will produce a summary line for each top-level folder
80 in the user's nmh directory, sorted alphabetically. (If \fIfolder\fR
81 is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR\0),
82 `\-all' is assumed). Specifying `\-recurse' with `\-all' will also
83 produce a line for all sub-folders. These folders are all preceded by
84 the read\-only folders, which occur as \*(lqatr\-cur\-\*(rq entries in
85 the user's \fInmh\fR context. For example,
89 .ta \w'/rnd/phyl/Mail/EP 'u +\w'has ddd messages 'u +\w'(ddd\-ddd); 'u
90 FOLDER \0\0\0\0\0\0# MESSAGES RANGE CUR (OTHERS)
91 /var/work/folder has \035 messages (\01\-\035); cur=23.
92 /usr/bugs/Mail has \082 messages (\01\-108); cur=82.
94 inbox+ has \016 messages (\03\-\022); cur=\05.
95 mh has \076 messages (15\-\076); cur=70.
96 notes has \0\02 messages (\01\-\0\02); cur=\01.
97 ucom has 124 messages (\01\-124); cur=\06; (others).
98 .ta \w'/rnd/phyl/Mail/EP has 'u
100 TOTAL = 339 messages in 7 folders
105 The \*(lq+\*(rq after inbox indicates that it is the current folder.
106 The \*(lq(others)\*(rq indicates that the folder `ucom' has files which
107 aren't messages. These files may either be sub\-folders, or files that
108 don't belong under the nmh file naming scheme.
110 The header is output if either a `\-all' or a `\-header' switch is
111 specified. It is suppressed by `\-noheader'.
113 The folder and message totals are output if either a `\-all' or a
114 `\-total' switch is specified. It is suppressed by `\-nototal'.
116 If `\-fast' is given, only the folder name (or names in the case of
117 `\-all') will be listed. (This is faster because the folders need not
120 If a `+folder' is given along with the `\-all' switch, \fIfolder\fR will,
121 in addition to setting the current folder, list the top\-level subfolders
122 for the current folder (with `\-norecurse') or list all sub-folders under
123 the current folder recursively (with `\-recurse'). In this case, if a
124 `msg' is also supplied, it will become the current message of `+folder'.
126 The `\-recurse' switch lists each folder recursively, so use of this
127 option effectively defeats the speed enhancement of the `\-fast' option,
128 since each folder must be searched for subfolders. Nevertheless, the
129 combination of these options is useful.
131 .Uh "Compacting a Folder"
132 The `\-pack' switch will compress the message names in the designated
133 folders, removing holes in message numbering. The `\-verbose' switch
134 directs \fIfolder\fR to tell the user the general actions that it is
135 taking to compress the folder.
137 .Uh "The Folder Stack"
138 The `\-push' switch directs \fIfolder\fR to push the current folder
139 onto the \fIfolder\-stack\fR, and make the `+folder' argument the
140 current folder. If `+folder' is not given, the current folder and the
141 top of the \fIfolder\-stack\fR are exchanged. This corresponds to the
142 \*(lqpushd\*(rq operation in the \fICShell\fR.
144 The `\-pop' switch directs \fIfolder\fR to discard the top of the
145 \fIfolder\-stack\fR, after setting the current folder to that value.
146 No `+folder' argument is allowed. This corresponds to the \*(lqpopd\*(rq
147 operation in the \fICShell\fR. The `\-push' switch and the `\-pop' switch
148 are mutually exclusive: the last occurrence of either one overrides
149 any previous occurrence of the other. Both of these switches also set
152 The `\-list' switch directs \fIfolder\fR to list the contents of
153 the \fIfolder\-stack\fR. No `+folder' argument is allowed. After a
154 successful `\-push' or `\-pop', the `\-list' action is taken, unless a
155 `\-nolist' switch follows them on the command line. This corresponds
156 to the \*(lqdirs\*(rq operation in the \fICShell\fR. The `\-push',
157 `\-pop', and `\-list' switches turn off `\-print'.
159 ^$HOME/\&.mh\(ruprofile~^The user profile
161 ^Path:~^To determine the user's nmh directory
163 ^Current\-Folder:~^To find the default current folder
165 ^Folder\-Protect:~^To set mode when creating a new folder
167 ^Folder\-Stack:~^To determine the folder stack
169 .\" ^lsproc:~^Program to list the contents of a folder
173 `+folder' defaults to the current folder
175 `msg' defaults to none
189 `\-print' is the default if no `\-list', `\-push', or `\-pop' is specified
191 `\-list' is the default if `\-push', or `\-pop' is specified
193 If `+folder' and/or `msg' are given, they will become the
194 current folder and/or message.
196 There is no way to restore the default behavior
197 (to ask the user whether to create a non-existant folder)
198 after `\-create' or `\-nocreate' is given.