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