use %etcdir% for spacing instead of hardcoding
[mmh] / man / mark.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH MARK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 mark \- manipulate message sequences
8 .SH SYNOPSIS
9 .HP 5
10 .na
11 .B mark
12 .RI [ +folder ]
13 .RI [ msgs ]
14 .RB [ \-sequence
15 .I name
16 \&...]
17 .RB [ \-add " | " \-delete ]
18 .RB [ \-list ] 
19 .RB [ \-public " | " \-nopublic ]
20 .RB [ \-zero " | " \-nozero ]
21 .RB [ \-version ]
22 .RB [ \-help ]
23 .ad
24 .SH DESCRIPTION
25 The
26 .B mark
27 command manipulates message sequences by adding or deleting
28 message numbers from folder\-specific message sequences, or by listing
29 those sequences and messages.
30 .PP
31 A message sequence is a keyword, just like one of the \*(lqreserved\*(rq
32 message names, such as \*(lqfirst\*(rq or \*(lqnext\*(rq.  Unlike the
33 \*(lqreserved\*(rq message names, which have a fixed semantics on
34 a per\-folder basis, the semantics of a message sequence may be
35 defined, modified, and removed by the user.  Message sequences are
36 folder\-specific, e.g., the sequence name \*(lqseen\*(rq in the context
37 of folder
38 .RI \*(lq +inbox \*(rq
39 need not have any relation whatsoever to the
40 sequence of the same name in a folder of a different name.
41 .PP
42 Three action switches direct the operation of
43 .BR mark .
44 These switches
45 are mutually exclusive: the last occurrence of any of them overrides
46 any previous occurrence of the other two.
47 .PP
48 The
49 .B \-add
50 switch tells
51 .B mark
52 to add messages to sequences or to
53 create a new sequence.  For each sequence named via the
54 .B \-sequence
55 .I name
56 argument (which must occur at least once) the messages named via
57 .I msgs
58 (which defaults to \*(lqcur\*(rq if no
59 .I msgs
60 are given), are added to the
61 sequence.  The messages to be added need not be absent from the sequence.
62 If the
63 .B \-zero
64 switch is specified, the sequence will be emptied prior
65 to adding the messages.  Hence,
66 .B \-add
67 .B \-zero
68 means that each sequence
69 should be initialized to the indicated messages, while
70 .B \-add
71 .B \-nozero
72 means that each sequence should be appended to by the indicated messages.
73 .PP
74 The
75 .B \-delete
76 switch tells
77 .B mark
78 to delete messages from sequences, and is the dual of
79 .BR \-add .
80 For each of the named sequences, the
81 named messages are removed from the sequence.  These messages need
82 not be already present in the sequence.  If the
83 .B \-zero
84 switch is
85 specified, then all messages in the folder are added to the sequence
86 (first creating the sequence, if necessary) before removing the messages.
87 Hence,
88 .B \-delete
89 .B \-zero
90 means that each sequence should contain
91 all messages except those indicated, while
92 .B \-delete
93 .B \-nozero
94 means
95 that only the indicated messages should be removed from each sequence.
96 As expected, the command
97 .RB \*(lq mark
98 .B \-sequence
99 .I foo
100 .B \-delete
101 .BR \-all \*(rq
102 deletes the sequence \*(lqfoo\*(rq from the current folder.
103 .PP
104 When creating or modifying sequences, you can specify the switches
105 .B \-public
106 or
107 .B \-nopublic
108 to force the new or modified sequences to be
109 \*(lqpublic\*(rq or \*(lqprivate\*(rq.  The switch
110 .B \-public
111 indicates
112 that the sequences should be made \*(lqpublic\*(rq.  These sequences
113 will then be readable by all
114 .B nmh
115 users with permission to read the relevant folders.  In contrast, the
116 .B \-nopublic
117 switch indicates that the
118 sequences should be made \*(lqprivate\*(rq, and will only be accessible by
119 you.  If neither of these switches is specified, then existing sequences
120 will maintain their current status, and new sequences will default to
121 \*(lqpublic\*(rq if you have write permission for the relevant folder.
122 Check the
123 .BR mh\-sequence (5)
124 man page for more details about the difference
125 between \*(lqpublic\*(rq and \*(lqprivate\*(rq sequences.
126 .PP
127 The
128 .B \-list
129 switch tells
130 .B mark
131 to list both the sequences defined
132 for the folder and the messages associated with those sequences.
133 .B Mark
134 will list the name of each sequence given by
135 .B \-sequence
136 .I name
137 and the messages associated with that sequence.  If the
138 sequence is private, this will also be indicated.  If no sequence is
139 specified by the
140 .B \-sequence
141 switch, then all sequences for this folder
142 will be listed.  The
143 .B \-zero
144 switch does not affect the operation of
145 .BR \-list .
146 .PP
147 The current restrictions on sequences are:
148 .PP
149 .IP \(bu 2
150 The name used to denote a message sequence must consist of an alphabetic
151 character followed by zero or more alphanumeric characters, and cannot
152 be one of the (reserved) message names \*(lqnew\*(rq, \*(lqfirst\*(rq,
153 \*(lqlast\*(rq, \*(lqall\*(rq, \*(lqnext\*(rq, or \*(lqprev\*(rq.
154 .PP
155 .IP \(bu 2
156 Only a certain number of sequences may be defined for a given folder.
157 This number is usually limited to 26 (10 on small systems).
158 .PP
159 .IP \(bu 2
160 Message ranges with user\-defined sequence names are restricted to the
161 form \*(lqname:n\*(rq, \*(lqname:+n\*(rq, or \*(lqname:-n\*(rq, and refer
162 to the first or last `n' messages of the sequence `name', respectively.
163 Constructs of the form \*(lqname1\-name2\*(rq are forbidden for user
164 defined sequences.
165
166 .SH FILES
167 .fc ^ ~
168 .nf
169 .ta \w'%etcdir%/ExtraBigFileName  'u
170 ^$HOME/\&.mh\(ruprofile~^The user profile
171 .fi
172
173 .SH "PROFILE COMPONENTS"
174 .fc ^ ~
175 .nf
176 .ta 2.4i
177 .ta \w'ExtraBigProfileName  'u
178 ^Path:~^To determine the user's nmh directory
179 ^Current\-Folder:~^To find the default current folder
180 .fi
181
182 .SH "SEE ALSO"
183 flist(1), pick(1), mh-sequence(5)
184
185 .SH DEFAULTS
186 .nf
187 .RB ` +folder "' defaults to the current folder"
188 .RB ` \-add "' if " \-sequence " is specified, " \-list " otherwise"
189 .RB ` msgs "' defaults to cur (or all if " \-list " is specified)"
190 .RB ` \-nozero '
191
192 .SH CONTEXT
193 If a folder is given, it will become the current folder.
194
195 .SH "HELPFUL HINTS"
196 Use
197 .B flist
198 to find folders with a given sequence, and
199 .RB \*(lq pick
200 .I sequence
201 .BR \-list \*(rq
202 to enumerate those messages in the sequence (such as for
203 use by a shell script).