Removed the -nomoreproc switch from mhl, show, mhshow.
[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 [ \-bell " | " \-nobell ]
12 .RB [ \-clear " | " \-noclear ]
13 .RB [ \-folder
14 .IR +folder ]
15 .RB [ \-form
16 .IR formfile ]
17 .RB [ \-length
18 .IR lines ]
19 .RB [ \-width
20 .IR columns ]
21 .RB [ \-moreproc
22 .IR program ]
23 .RI [ files
24 .IR \&... ]
25 .RB [ \-version ]
26 .RB [ \-help ]
27 .ad
28 .SH DESCRIPTION
29 .B Mhl
30 is an
31 .B nmh
32 command for filtering and/or displaying text
33 messages.  It is the default method of displaying text messages for
34 .B nmh
35 (it is the default
36 .IR showproc ).
37 .PP
38 As with
39 .BR more ,
40 each of the messages specified as arguments (or
41 the standard input) will be output.  If more than one message file is
42 specified, the user will be prompted prior to each one, and a <RETURN>
43 or <EOT> will begin the output, with <RETURN> clearing the screen (if
44 appropriate), and <EOT> (usually CTRL\-D) suppressing the screen clear.
45 An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
46 prompting for the next message (if there is one), and a <QUIT> (usually
47 CTRL-\\) will terminate the program (without core dump).
48 .PP
49 The
50 .B \-bell
51 option tells
52 .B mhl
53 to ring the terminal's bell at the
54 end of each page, while the
55 .B \-clear
56 option tells
57 .B mhl
58 to clear the
59 screen at the end of each page (or output a formfeed after each message).
60 Both of these switches (and their inverse counterparts) take effect only
61 if the profile entry
62 .I moreproc
63 is defined but empty, and
64 .B mhl
65 is outputting to a terminal.  If the
66 .I moreproc
67 entry is defined and
68 non-empty, and
69 .B mhl
70 is outputting to a terminal, then
71 .B mhl
72 will
73 cause the
74 .I moreproc
75 to be placed between the terminal and
76 .B mhl
77 and the switches are ignored.  Furthermore, if the
78 .B \-clear
79 switch is
80 used and \fImhl's\fR output is directed to a terminal, then
81 .B mhl
82 will consult the
83 .B $TERM
84 and
85 .B $TERMCAP
86 environment variables
87 to determine the user's terminal type in order to find out how to clear
88 the screen.  If the
89 .B \-clear
90 switch is used and
91 .BR mhl 's
92 output is
93 not directed to a terminal (e.g., a pipe or a file), then
94 .B mhl
95 will
96 send a formfeed after each message.
97 .PP
98 To override the default
99 .I moreproc
100 and the profile entry, use the
101 .B \-moreproc
102 .I program
103 switch.  Note that
104 .B mhl
105 will never start a
106 .I moreproc
107 if invoked on a hardcopy terminal.
108 .PP
109 The
110 .B \-length
111 .I length
112 and
113 .B \-width
114 .I width
115 switches set the screen
116 length and width, respectively.  These default to the values indicated by
117 .BR $TERMCAP ,
118 if appropriate, otherwise they default to 40 and 80, respectively.
119 .PP
120 The default format file used by
121 .B mhl
122 is called
123 .RI \*(lq mhl.format \*(rq.
124 .B mhl
125 will first search for this file in the user's
126 .B mmh
127 directory, and will then search in the directory
128 .IR %etcdir% .
129 This default
130 can be changed by using the
131 .B \-form
132 .I formatfile
133 switch.
134 Note: In contrast to any other
135 .B mmh
136 tool, the
137 .B \-form
138 switch does only take file names, but no format strings with a prepended
139 equal sign `='.
140 .PP
141 Finally, the
142 .B \-folder
143 .I +folder
144 switch sets the
145 .B nmh
146 folder name,
147 which is used for the \*(lqmessagename:\*(rq field described below.  The
148 environment variable
149 .B $mhfolder
150 is consulted for the default value,
151 which
152 .BR show ,
153 .BR next ,
154 and
155 .B prev
156 initialize appropriately.
157 .PP
158 .B Mhl
159 operates in two phases: 1) read and parse the format file, and
160 2) process each message (file).  During phase 1, an internal description
161 of the format is produced as a structured list.  In phase 2, this list
162 is walked for each message, outputting message information under the
163 format constraints from the format file.
164 .PP
165 The format file can contain information controlling screen clearing,
166 screen size, wrap\-around control, transparent text, component ordering,
167 and component formatting.  Also, a list of components to ignore may be
168 specified, and a couple of \*(lqspecial\*(rq components are defined
169 to provide added functionality.  Message output will be in the order
170 specified by the order in the format file.
171 .PP
172 Each line of a format file has one of the following forms:
173 .PP
174 .RS 5
175 .nf
176 ;comment
177 :cleartext
178 variable[,variable...]
179 component:[variable,...]
180 .fi
181 .RE
182 .PP
183 .IP \(bu 4
184 A line beginning with a `;' is a comment, and is ignored.
185 .IP \(bu 4
186 A line beginning with a `:' is clear text, and is output exactly as is.
187 .IP \(bu 4
188 A line containing only a `:' produces a blank line in the output.
189 .IP \(bu 4
190 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
191 component,
192 .IP \(bu 4
193 Remaining lines define the global environment.
194 .PP
195 For example, the line:
196 .PP
197 .RS 5
198 width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
199 .RE
200 .PP
201 defines the screen size to be 80 columns by 40 rows, specifies that the
202 screen should be cleared prior to each page, that the overflow indentation
203 is 5, and that overflow text should be flagged with \*(lq***\*(rq.
204 .PP
205 Following are all of the current variables and their arguments.  If they
206 follow a component, they apply only to that component, otherwise, their
207 affect is global.  Since the whole format is parsed before any output
208 processing, the last global switch setting for a variable applies to
209 the whole message if that variable is used in a global context (i.e.,
210 bell, clearscreen, width, length).
211 .PP
212 .RS 5
213 .nf
214 .ta \w'noclearscreen  'u +\w'integer/G  'u
215 .I variable     type    semantics
216 width   integer screen width or component width
217 length  integer screen length or component length
218 offset  integer positions to indent \*(lqcomponent: \*(rq
219 overflowtext    string  text to use at the beginning of an
220                 overflow line
221 overflowoffset  integer positions to indent overflow lines
222 compwidth       integer positions to indent component text
223                 after the first line is output
224 uppercase       flag    output text of this component in all
225                 upper case
226 nouppercase     flag    don't uppercase
227 clearscreen     flag/G  clear the screen prior to each page
228 noclearscreen   flag/G  don't clearscreen
229 bell    flag/G  ring the bell at the end of each page
230 nobell  flag/G  don't bell
231 component       string/L        name to use instead of \*(lqcomponent\*(rq for
232                 this component
233 nocomponent     flag    don't output \*(lqcomponent: \*(rq for this
234                 component
235 center  flag    center component on line (works for
236                 one\-line components only)
237 nocenter        flag    don't center
238 leftadjust      flag    strip off leading whitespace on each
239                 line of text
240 noleftadjust    flag    don't leftadjust
241 compress        flag    change newlines in text to spaces
242 nocompress      flag    don't compress
243 split   flag    don't combine multiple fields into
244                 a single field
245 nosplit flag    combine multiple fields into
246                 a single field
247 newline flag    print newline at end of components
248                 (this is the default)
249 nonewline       flag    don't print newline at end of components
250 formatfield     string  format string for this component
251                 (see below)
252 decode  flag    decode text as RFC-2047 encoded
253                 header field
254 addrfield       flag    field contains addresses
255 datefield       flag    field contains dates
256 .fi
257 .RE
258 .PP
259 To specify the value of integer\-valued and string\-valued variables,
260 follow their name with an equals\-sign and the value.  Integer\-valued
261 variables are given decimal values, while string\-valued variables
262 are given arbitrary text bracketed by double\-quotes.  If a value is
263 suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq, then its value is useful in
264 a global\-only or local\-only context (respectively).
265 .PP
266 A line of the form:
267 .PP
268 .RS 5
269 ignores=component,...
270 .RE
271 .PP
272 specifies a list of components which are never output.
273 .PP
274 The component \*(lqMessageName\*(rq (case\-insensitive) will output the
275 actual message name (file name) preceded by the folder name if one is
276 specified or found in the environment.  The format is identical to that
277 produced by the
278 .B \-header
279 option to
280 .BR show .
281 .PP
282 The component \*(lqExtras\*(rq will output all of the components of the
283 message which were not matched by explicit components, or included in
284 the ignore list.  If this component is not specified, an ignore list is
285 not needed since all non\-specified components will be ignored.
286 .PP
287 If \*(lqnocomponent\*(rq is NOT specified, then the component name will
288 be output as it appears in the format file.
289 .PP
290 The default format file is:
291 .PP
292 .RS 5
293 .nf
294 %mhl_format%
295 .fi
296 .RE
297 .PP
298 The variable \*(lqformatfield\*(rq specifies a format string (see
299 .BR mh\-format (5)).
300 The flag variables \*(lqaddrfield\*(rq and
301 \*(lqdatefield\*(rq (which are mutually exclusive), tell
302 .B mhl
303 to interpret the escapes in the format string as either addresses or
304 dates, respectively.
305 .PP
306 By default,
307 .B mhl
308 does not apply any formatting string to fields
309 containing address or dates (see
310 .BR mh\-mail (5)
311 for a list of these
312 fields).  Note that this results in faster operation since
313 .B mhl
314 must parse both addresses and dates in order to apply a format string
315 to them.  If desired,
316 .B mhl
317 can be given a default format string for
318 either address or date fields (but not both).  To do this, on a global
319 line specify: either the flag addrfield or datefield, along with the
320 appropriate formatfield variable string.
321
322 .SH FILES
323 .fc ^ ~
324 .nf
325 .ta \w'%etcdir%/ExtraBigFileName  'u
326 ^%etcdir%/mhl.format~^The message template
327 ^or $HOME/.mmh/mhl.format~^Rather than the standard template
328 ^$HOME/.mh/profile~^The user profile
329 .fi
330
331 .SH "PROFILE COMPONENTS"
332 .fc ^ ~
333 .nf
334 .ta 2.4i
335 .ta \w'ExtraBigProfileName  'u
336 ^moreproc:~^Program to use as interactive front\-end
337 .fi
338
339 .SH "SEE ALSO"
340 show(1), ap(8), dp(8)
341
342 .SH DEFAULTS
343 .nf
344 .RB ` \-bell '
345 .RB ` \-noclear '
346 .RB ` \-length 40 '
347 .RB ` \-width 80 '
348 .fi
349
350 .SH CONTEXT
351 None
352
353 .SH BUGS
354 In contrast to any other
355 .B mmh
356 tool, the
357 .B \-form
358 switch does only take file names, but no format strings with a prepended
359 equal sign `='.
360 .PP
361 There should be some way to pass `bell' and `clear' information to the
362 front\-end.
363 .PP
364 The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq
365 and \*(lqsplit\*(rq.