4 .TH MHL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mhl \- produce formatted listings of nmh messages
11 .RB [ \-bell " | " \-nobell ]
12 .RB [ \-clear " | " \-noclear ]
33 command for filtering and/or displaying text
34 messages. It is the default method of displaying text messages for
41 each of the messages specified as arguments (or
42 the standard input) will be output. If more than one message file is
43 specified, the user will be prompted prior to each one, and a <RETURN>
44 or <EOT> will begin the output, with <RETURN> clearing the screen (if
45 appropriate), and <EOT> (usually CTRL\-D) suppressing the screen clear.
46 An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
47 prompting for the next message (if there is one), and a <QUIT> (usually
48 CTRL-\\) will terminate the program (without core dump).
54 to ring the terminal's bell at the
55 end of each page, while the
60 screen at the end of each page (or output a formfeed after each message).
61 Both of these switches (and their inverse counterparts) take effect only
64 is defined but empty, and
66 is outputting to a terminal. If the
71 is outputting to a terminal, then
76 to be placed between the terminal and
78 and the switches are ignored. Furthermore, if the
81 used and \fImhl's\fR output is directed to a terminal, then
88 to determine the user's terminal type in order to find out how to clear
94 not directed to a terminal (e.g., a pipe or a file), then
97 send a formfeed after each message.
99 To override the default
101 and the profile entry, use the
108 if invoked on a hardcopy terminal.
116 switches set the screen
117 length and width, respectively. These default to the values indicated by
119 if appropriate, otherwise they default to 40 and 80, respectively.
121 The default format file used by
124 .RI \*(lq mhl.format \*(rq.
126 will first search for this file in the user's
128 directory, and will then search in the directory
131 can be changed by using the
142 which is used for the \*(lqmessagename:\*(rq field described below. The
145 is consulted for the default value,
151 initialize appropriately.
154 operates in two phases: 1) read and parse the format file, and
155 2) process each message (file). During phase 1, an internal description
156 of the format is produced as a structured list. In phase 2, this list
157 is walked for each message, outputting message information under the
158 format constraints from the format file.
160 The format file can contain information controlling screen clearing,
161 screen size, wrap\-around control, transparent text, component ordering,
162 and component formatting. Also, a list of components to ignore may be
163 specified, and a couple of \*(lqspecial\*(rq components are defined
164 to provide added functionality. Message output will be in the order
165 specified by the order in the format file.
167 Each line of a format file has one of the following forms:
173 variable[,variable...]
174 component:[variable,...]
179 A line beginning with a `;' is a comment, and is ignored.
181 A line beginning with a `:' is clear text, and is output exactly as is.
183 A line containing only a `:' produces a blank line in the output.
185 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
188 Remaining lines define the global environment.
190 For example, the line:
193 width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
196 defines the screen size to be 80 columns by 40 rows, specifies that the
197 screen should be cleared prior to each page, that the overflow indentation
198 is 5, and that overflow text should be flagged with \*(lq***\*(rq.
200 Following are all of the current variables and their arguments. If they
201 follow a component, they apply only to that component, otherwise, their
202 affect is global. Since the whole format is parsed before any output
203 processing, the last global switch setting for a variable applies to
204 the whole message if that variable is used in a global context (i.e.,
205 bell, clearscreen, width, length).
209 .ta \w'noclearscreen 'u +\w'integer/G 'u
210 .I "variable type semantics"
211 width integer screen width or component width
212 length integer screen length or component length
213 offset integer positions to indent \*(lqcomponent: \*(rq
214 overflowtext string text to use at the beginning of an
216 overflowoffset integer positions to indent overflow lines
217 compwidth integer positions to indent component text
218 after the first line is output
219 uppercase flag output text of this component in all
221 nouppercase flag don't uppercase
222 clearscreen flag/G clear the screen prior to each page
223 noclearscreen flag/G don't clearscreen
224 bell flag/G ring the bell at the end of each page
225 nobell flag/G don't bell
226 component string/L name to use instead of \*(lqcomponent\*(rq for
228 nocomponent flag don't output \*(lqcomponent: \*(rq for this
230 center flag center component on line (works for
231 one\-line components only)
232 nocenter flag don't center
233 leftadjust flag strip off leading whitespace on each
235 noleftadjust flag don't leftadjust
236 compress flag change newlines in text to spaces
237 nocompress flag don't compress
238 wrap flag Wrap lines that exceed width (default)
239 nowrap flag Do not perform line wrapping
240 split flag don't combine multiple fields into
242 nosplit flag combine multiple fields into
244 newline flag print newline at end of components
245 (this is the default)
246 nonewline flag don't print newline at end of components
247 formatfield string format string for this component
249 decode flag decode text as RFC-2047 encoded
251 addrfield flag field contains addresses
252 datefield flag field contains dates
253 format flag Run component through formatproc filter
255 noformat flag Do not run component through
256 formatproc filter (default)
260 To specify the value of integer\-valued and string\-valued variables,
261 follow their name with an equals\-sign and the value. Integer\-valued
262 variables are given decimal values, while string\-valued variables
263 are given arbitrary text bracketed by double\-quotes. If a value is
264 suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq, then its value is useful in
265 a global\-only or local\-only context (respectively).
270 ignores=component,...
273 specifies a list of components which are never output.
275 The component \*(lqMessageName\*(rq (case\-insensitive) will output the
276 actual message name (file name) preceded by the folder name if one is
277 specified or found in the environment. The format is identical to that
283 The component \*(lqExtras\*(rq will output all of the components of the
284 message which were not matched by explicit components, or included in
285 the ignore list. If this component is not specified, an ignore list is
286 not needed since all non\-specified components will be ignored.
288 If \*(lqnocomponent\*(rq is NOT specified, then the component name will
289 be output as it appears in the format file.
291 The default format file is:
299 The variable \*(lqformatfield\*(rq specifies a format string (see
301 The flag variables \*(lqaddrfield\*(rq and
302 \*(lqdatefield\*(rq (which are mutually exclusive), tell
304 to interpret the escapes in the format string as either addresses or
309 does not apply any formatting string to fields
310 containing address or dates (see
313 fields). Note that this results in faster operation since
315 must parse both addresses and dates in order to apply a format string
318 can be given a default format string for
319 either address or date fields (but not both). To do this, on a global
320 line specify: either the flag addrfield or datefield, along with the
321 appropriate formatfield variable string.
323 The \*(lqformat\*(rq flag specifies that this component will be run through
324 the filter program specified by the
326 profile entry. This filter program is expected to read data on standard
327 input and output data on standard output. Currently the \*(lqformat\*(rq
328 flag is only supported for the \(*lqbody\*(rq component. The component
329 name will be prefixed to the output
331 the filter has been run. The expected use of this is to filter a message
332 body to create more pleasing text to use in a reply message.
333 A suggested filter to use for
338 body:component=">",overflowtext=">",overflowoffset=0,format,nowrap
343 .ta \w'%etcdir%/ExtraBigFileName 'u
344 ^%etcdir%/mhl.format~^The message template
345 ^or <mh\-dir>/mhl.format~^Rather than the standard template
346 ^$HOME/\&.mh\(ruprofile~^The user profile
349 .SH "PROFILE COMPONENTS"
353 .ta \w'ExtraBigProfileName 'u
354 ^moreproc:~^Program to use as interactive front\-end
355 ^formatproc:~^Program to use as a filter for components that
356 ^^have the \*(lqformat\*(rq flag set.
360 show(1), ap(8), dp(8)
374 There should be some way to pass `bell' and `clear' information to the
377 The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq