1FOLDER(1)                    [nmh-1.2-20070115cvs]                   FOLDER(1)
2
3
4

NAME

6       folder, folders - set/list current folder/message
7

SYNOPSIS

9       folder [+folder] [msgs] [-all | -noall] [-create | -nocreate] [-fast |
10            -nofast] [-header | -noheader] [-recurse | -norecurse] [-total |
11            -nototal] [-list | -nolist] [-push | -pop] [-pack | -nopack]
12            [-print] [-verbose | -noverbose] [-version] [-help]
13
14       folders is equivalent to folder -all
15

DESCRIPTION

17       Since the nmh environment is the shell, it is easy to lose track of the
18       current folder from day to day.  When folder is given the -print switch
19       (the default), folder will list the current folder, the number of  mes‐
20       sages in it, the range of the messages (low-high), and the current mes‐
21       sage within the folder, and will flag extra files if  they  exist.   An
22       example of this summary is:
23
24            inbox+            has  16 messages (  3- 22); cur=  5.
25
26       If  a  +folder  and/or  msg are specified, they will become the current
27       folder and/or message.  By  comparison,  when  a  +folder  argument  is
28       given,  this  corresponds  to  a  “cd”  operation in the shell; when no
29       +folder argument is given, this corresponds roughly to a  “pwd”  opera‐
30       tion in the shell.
31
32       If  the specified (or default) folder doesn't exist, the default action
33       is to query the user as to whether the folder should be  created;  when
34       standard  input  is not a tty, the answer to the query is assumed to be
35       “yes”.
36
37       Specifying -create will cause folder to create new folders without  any
38       query.  (This is the easy way to create an empty folder for use later.)
39       Specifying -nocreate will cause folder to exit without creating a  non-
40       existant folder.
41
42
43   Multiple Folders
44       Specifying  -all  will produce a summary line for each top-level folder
45       in the user's nmh directory,  sorted  alphabetically.   (If  folder  is
46       invoked  by  a  name ending with “s” (e.g.  folders), -all is assumed).
47       Specifying -recurse with -all will also produce a  line  for  all  sub-
48       folders.   These  folders  are  all  preceded by the read-only folders,
49       which occur as “atr-cur-” entries in the user's nmh context.  For exam‐
50       ple:
51
52            FOLDER                  # MESSAGES RANGE      CUR     (OTHERS)
53            /var/work/folder  has  35 messages ( 1- 35);  cur=23.
54            /usr/bugs/Mail    has  82 messages ( 1-108);  cur=82.
55            ff                has  no messages.
56            inbox+            has  16 messages ( 3- 22);  cur= 5.
57            mh                has  76 messages (15- 76);  cur=70.
58            notes             has   2 messages ( 1-  2);  cur= 1.
59            ucom              has 124 messages ( 1-124);  cur= 6; (others).
60
61            TOTAL = 339 messages in 7 folders
62
63       The  “+”  after  inbox  indicates  that  it is the current folder.  The
64       “(others)” indicates that the folder ucom has files which  aren't  mes‐
65       sages.   These  files  may  either  be sub-folders, or files that don't
66       belong under the nmh file naming scheme.
67
68       The header is output if either a -all or a -header switch is specified.
69       It is suppressed by -noheader.
70
71       The  folder  and message totals are output if either a -all or a -total
72       switch is specified.  It is suppressed by -nototal.
73
74       If -fast is given, only the folder name (or names in the case of  -all)
75       will be listed.  (This is faster because the folders need not be read.)
76
77       If a +folder is given along with the -all switch, folder will, in addi‐
78       tion to setting the current folder, list the top-level  subfolders  for
79       the  current folder (with -norecurse) or list all sub-folders under the
80       current folder recursively (with -recurse).  In this case, if a msg  is
81       also supplied, it will become the current message of +folder.
82
83       The  -recurse  switch  lists  each  folder  recursively, so use of this
84       option effectively defeats the speed enhancement of the  -fast  option,
85       since  each  folder must be searched for subfolders.  Nevertheless, the
86       combination of these options is useful.
87
88   Compacting a Folder
89       The -pack switch will compress the  message  names  in  the  designated
90       folders,  removing  holes  in  message  numbering.  The -verbose switch
91       directs folder to tell the user the general actions that it  is  taking
92       to compress the folder.
93
94   The Folder Stack
95       The  -push  switch  directs  folder to push the current folder onto the
96       folder-stack, and make the +folder argument  the  current  folder.   If
97       +folder   is  not  given,  the  current  folder  and  the  top  of  the
98       folder-stack are exchanged.  This corresponds to the “pushd”  operation
99       in the shell.
100
101       The  -pop switch directs folder to discard the top of the folder-stack,
102       after setting the current folder to that value.  No +folder argument is
103       allowed.   This  corresponds to the “popd” operation in the shell.  The
104       -push switch and the -pop  switch  are  mutually  exclusive:  the  last
105       occurrence  of  either  one  overrides  any  previous occurrence of the
106       other.  Both of these switches also set -list by default.
107
108       The  -list  switch  directs  folder  to  list  the  contents   of   the
109       folder-stack.   No  +folder  argument  is  allowed.  After a successful
110       -push or -pop, the -list action is taken, unless a -nolist switch  fol‐
111       lows  them  on the command line.  This corresponds to the “dirs” opera‐
112       tion in the shell.  The  -push,  -pop,  and  -list  switches  turn  off
113       -print.
114
115

FILES

117       $HOME/.mh_profile          The user profile
118
119

PROFILE COMPONENTS

121       Path:                To determine the user's nmh directory
122       Current-Folder:      To find the default current folder
123       Folder-Protect:      To set mode when creating a new folder
124       Folder-Stack:        To determine the folder stack
125
126

SEE ALSO

128       refile(1), mhpath(1)
129
130

DEFAULTS

132       `+folder' defaults to the current folder
133       `msg' defaults to none
134       `-nofast'
135       `-noheader'
136       `-nototal'
137       `-nopack'
138       `-norecurse'
139       `-noverbose'
140       `-print' is the default if no -list, -push, or -pop is specified
141       `-list' is the default if -push, or -pop is specified
142
143

CONTEXT

145       If  +folder  and/or  msg are given, they will become the current folder
146       and/or message.
147
148

BUGS

150       There is no way to restore  the  default  behavior  (to  ask  the  user
151       whether  to create a non-existant folder) after -create or -nocreate is
152       given.
153
154
155
156MH.6.8                            1 Jul 2003                         FOLDER(1)
Impressum