Fixed a bunch of minor man page formating problems.
[mmh] / man / mhl.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MHL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mhl \- produce formatted listings of nmh messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhl
11 .RB [ \-folder
12 .IR +folder ]
13 .RB [ \-form
14 .IR formfile ]
15 .RB [ \-width
16 .IR columns ]
17 .RI [ files
18 .IR \&... ]
19 .RB [ \-version ]
20 .RB [ \-help ]
21 .ad
22 .SH DESCRIPTION
23 .B Mhl
24 is an
25 .B nmh
26 command for filtering and/or displaying text
27 messages.  It is the default method of displaying text messages for
28 .B nmh
29 (it is the default
30 .IR showproc ).
31 .PP
32 If
33 .B mhl
34 is outputting to a terminal, then
35 .B mhl
36 will cause a pager to be placed between the terminal and
37 .BR mhl .
38 .PP
39 The
40 .B \-width
41 .I width
42 switch sets the screen width.  This defaults to the value indicated by
43 .BR $TERMCAP ,
44 if appropriate, otherwise it defaults to 80.
45 .PP
46 The default format file used by
47 .B mhl
48 is called
49 .RI \*(lq mhl.format \*(rq.
50 .B mhl
51 will first search for this file in the user's
52 .B mmh
53 directory, and will then search in the directory
54 .IR %etcdir% .
55 This default
56 can be changed by using the
57 .B \-form
58 .I formatfile
59 switch.
60 Note: In contrast to any other
61 .B mmh
62 tool, the
63 .B \-form
64 switch does only take file names, but no format strings with a prepended
65 equal sign `='.
66 .PP
67 Finally, the
68 .B \-folder
69 .I +folder
70 switch sets the
71 .B nmh
72 folder name,
73 which is used for the \*(lqmessagename:\*(rq field described below.  The
74 environment variable
75 .B $mhfolder
76 is consulted for the default value,
77 which
78 .BR show ,
79 .BR next ,
80 and
81 .B prev
82 initialize appropriately.
83 .PP
84 .B Mhl
85 operates in two phases: 1) read and parse the format file, and
86 2) process each message (file).  During phase 1, an internal description
87 of the format is produced as a structured list.  In phase 2, this list
88 is walked for each message, outputting message information under the
89 format constraints from the format file.
90 .PP
91 The format file can contain information controlling
92 screen size, wrap\-around control, transparent text, component ordering,
93 and component formatting.  Also, a list of components to ignore may be
94 specified, and a couple of \*(lqspecial\*(rq components are defined
95 to provide added functionality.  Message output will be in the order
96 specified by the order in the format file.
97 .PP
98 Each line of a format file has one of the following forms:
99 .PP
100 .RS 5
101 .nf
102 ;comment
103 :cleartext
104 variable[,variable...]
105 component:[variable,...]
106 .fi
107 .RE
108 .PP
109 .IP \(bu 4
110 A line beginning with a `;' is a comment, and is ignored.
111 .IP \(bu 4
112 A line beginning with a `:' is clear text, and is output exactly as is.
113 .IP \(bu 4
114 A line containing only a `:' produces a blank line in the output.
115 .IP \(bu 4
116 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
117 component,
118 .IP \(bu 4
119 Remaining lines define the global environment.
120 .PP
121 For example, the line:
122 .PP
123 .RS 5
124 width=80,overflowtext="***",overflowoffset=5
125 .RE
126 .PP
127 defines the screen size to be 80 columns by 40 rows, specifies that the
128 overflow indentation
129 is 5, and that overflow text should be flagged with \*(lq***\*(rq.
130 .PP
131 Following are all of the current variables and their arguments.  If they
132 follow a component, they apply only to that component, otherwise, their
133 affect is global.  Since the whole format is parsed before any output
134 processing, the last global switch setting for a variable applies to
135 the whole message if that variable is used in a global context (i.e.,
136 width).
137 .PP
138 .RS 5
139 .nf
140 .ta \w'xxxxxxxxxxxxx  'u +\w'integer/G  'u
141 .I "variable    type    semantics
142 width   integer screen width or component width
143 length  integer component length
144 offset  integer positions to indent \*(lqcomponent: \*(rq
145 overflowtext    string  text to use at the beginning of an
146                 overflow line
147 overflowoffset  integer positions to indent overflow lines
148 compwidth       integer positions to indent component text
149                 after the first line is output
150 uppercase       flag    output text of this component in all
151                 upper case
152 nouppercase     flag    don't uppercase
153 component       string/L        name to use instead of \*(lqcomponent\*(rq for
154                 this component
155 nocomponent     flag    don't output \*(lqcomponent: \*(rq for this
156                 component
157 center  flag    center component on line (works for
158                 one\-line components only)
159 nocenter        flag    don't center
160 leftadjust      flag    strip off leading whitespace on each
161                 line of text
162 noleftadjust    flag    don't leftadjust
163 compress        flag    change newlines in text to spaces
164 nocompress      flag    don't compress
165 split   flag    don't combine multiple fields into
166                 a single field
167 nosplit flag    combine multiple fields into
168                 a single field
169 newline flag    print newline at end of components
170                 (this is the default)
171 nonewline       flag    don't print newline at end of components
172 formatfield     string  format string for this component
173                 (see below)
174 decode  flag    decode text as RFC-2047 encoded
175                 header field
176 addrfield       flag    field contains addresses
177 datefield       flag    field contains dates
178 .fi
179 .RE
180 .PP
181 To specify the value of integer\-valued and string\-valued variables,
182 follow their name with an equals\-sign and the value.  Integer\-valued
183 variables are given decimal values, while string\-valued variables
184 are given arbitrary text bracketed by double\-quotes.  If a value is
185 suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq, then its value is useful in
186 a global\-only or local\-only context (respectively).
187 .PP
188 A line of the form:
189 .PP
190 .RS 5
191 ignores=component,...
192 .RE
193 .PP
194 specifies a list of components which are never output.
195 .PP
196 The component \*(lqMessageName\*(rq (case\-insensitive) will output the
197 actual message name (file name) preceded by the folder name if one is
198 specified or found in the environment.  The format is identical to that
199 produced by the
200 .B \-header
201 option to
202 .BR show .
203 .PP
204 The component \*(lqExtras\*(rq will output all of the components of the
205 message which were not matched by explicit components, or included in
206 the ignore list.  If this component is not specified, an ignore list is
207 not needed since all non\-specified components will be ignored.
208 .PP
209 If \*(lqnocomponent\*(rq is NOT specified, then the component name will
210 be output as it appears in the format file.
211 .PP
212 The default format file is:
213 .PP
214 .RS 5
215 .nf
216 %mhl_format%
217 .fi
218 .RE
219 .PP
220 The variable \*(lqformatfield\*(rq specifies a format string (see
221 .BR mh\-format (5)).
222 The flag variables \*(lqaddrfield\*(rq and
223 \*(lqdatefield\*(rq (which are mutually exclusive), tell
224 .B mhl
225 to interpret the escapes in the format string as either addresses or
226 dates, respectively.
227 .PP
228 By default,
229 .B mhl
230 does not apply any formatting string to fields
231 containing address or dates (see
232 .BR mh\-mail (5)
233 for a list of these
234 fields).  Note that this results in faster operation since
235 .B mhl
236 must parse both addresses and dates in order to apply a format string
237 to them.  If desired,
238 .B mhl
239 can be given a default format string for
240 either address or date fields (but not both).  To do this, on a global
241 line specify: either the flag addrfield or datefield, along with the
242 appropriate formatfield variable string.
243
244 .SH FILES
245 .fc ^ ~
246 .nf
247 .ta \w'%etcdir%/ExtraBigFileName  'u
248 ^%etcdir%/mhl.format~^The message template
249 ^or $HOME/.mmh/mhl.format~^Rather than the standard template
250 ^$HOME/.mh/profile~^The user profile
251 .fi
252
253 .SH "PROFILE COMPONENTS"
254 .fc ^ ~
255 .nf
256 .ta 2.4i
257 .ta \w'ExtraBigProfileName  'u
258 ^Pager:~^Program to use as interactive front\-end
259 .fi
260
261 .SH "SEE ALSO"
262 show(1), ap(8), dp(8)
263
264 .SH DEFAULTS
265 .nf
266 .RB ` \-width \ 80'
267 .fi
268
269 .SH CONTEXT
270 None
271
272 .SH BUGS
273 In contrast to any other
274 .B mmh
275 tool, the
276 .B \-form
277 switch does only take file names, but no format strings with a prepended
278 equal sign `='.
279 .PP
280 The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq
281 and \*(lqsplit\*(rq.