1 .TH MHL %manext1% "September 14, 2014" "%nmhversion%"
6 mhl \- produce formatted listings of nmh messages
10 .B %nmhlibexecdir%/mhl
13 .RB [ \-bell " | " \-nobell ]
14 .RB [ \-clear " | " \-noclear ]
36 command for filtering and/or displaying text
37 messages. It is the default method of displaying text messages for
44 each of the messages specified as arguments (or
45 the standard input) will be output. If more than one message file is
46 specified, the user will be prompted prior to each one, and a <RETURN>
47 or <EOT> will begin the output, with <RETURN> clearing the screen (if
48 appropriate), and <EOT> (usually CTRL\-D) suppressing the screen clear.
49 An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
50 prompting for the next message (if there is one), and a <QUIT> (usually
51 CTRL-\\) will terminate the program (without core dump).
57 to ring the terminal's bell at the
58 end of each page, while the
63 screen at the end of each page (or output a formfeed after each message).
64 Both of these switches (and their inverse counterparts) take effect only
67 is defined but empty, and
69 is outputting to a terminal. If the
74 is outputting to a terminal, then
79 to be placed between the terminal and
81 and the switches are ignored. Furthermore, if the
84 used and \fImhl's\fR output is directed to a terminal, then
91 to determine the user's terminal type in order to find out how to clear
97 not directed to a terminal (e.g., a pipe or a file), then
100 send a formfeed after each message.
102 To override the default
104 and the profile entry, use the
111 if invoked on a hardcopy terminal.
119 switches set the screen
120 length and width, respectively. These default to the values indicated by
122 if appropriate, otherwise they default to 40 and 80, respectively.
124 The default format file used by
127 .RI \*(lq mhl.format \*(rq.
129 will first search for this file in the user's
131 directory, and will then search in the directory
134 can be changed by using the
145 which is used for the \*(lqmessagename:\*(rq field described below. The
148 is consulted for the default value,
154 initialize appropriately.
157 operates in two phases: 1) read and parse the format file, and
158 2) process each message (file). During phase 1, an internal description
159 of the format is produced as a structured list. In phase 2, this list
160 is walked for each message, outputting message information under the
161 format constraints from the format file.
163 The format file can contain information controlling screen clearing,
164 screen size, wrap\-around control, transparent text, component ordering,
165 and component formatting. Also, a list of components to ignore may be
166 specified, and a couple of \*(lqspecial\*(rq components are defined
167 to provide added functionality. Message output will be in the order
168 specified by the order in the format file.
170 Each line of a format file has one of the following forms:
176 variable[,variable...]
177 component:[variable,...]
182 A line beginning with a `;' is a comment, and is ignored.
184 A line beginning with a `:' is clear text, and is output exactly as is.
186 A line containing only a `:' produces a blank line in the output.
188 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
191 Remaining lines define the global environment.
193 For example, the line:
196 width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
199 defines the screen size to be 80 columns by 40 rows, specifies that the
200 screen should be cleared prior to each page, that the overflow indentation
201 is 5, and that overflow text should be flagged with \*(lq***\*(rq.
203 Following are all of the current variables and their arguments. If they
204 follow a component, they apply only to that component, otherwise, their
205 affect is global. Since the whole format is parsed before any output
206 processing, the last global switch setting for a variable applies to
207 the whole message if that variable is used in a global context (i.e.,
208 bell, clearscreen, width, length).
212 .ta \w'noclearscreen 'u +\w'integer/G 'u
213 .I "variable type semantics"
214 width integer screen width or component width
215 length integer screen length or component length
216 offset integer positions to indent \*(lqcomponent: \*(rq
217 overflowtext string text to use at the beginning of an
219 overflowoffset integer positions to indent overflow lines
220 compwidth integer positions to indent component text
221 after the first line is output
222 uppercase flag output text of this component in all
224 nouppercase flag don't uppercase
225 clearscreen flag/G clear the screen prior to each page
226 noclearscreen flag/G don't clearscreen
227 bell flag/G ring the bell at the end of each page
228 nobell flag/G don't bell
229 component string/L name to use instead of \*(lqcomponent\*(rq for
231 nocomponent flag don't output \*(lqcomponent: \*(rq for this
233 center flag center component on line (works for
234 one\-line components only)
235 nocenter flag don't center
236 leftadjust flag strip off leading whitespace on each
238 noleftadjust flag don't leftadjust
239 rtrim flag trim whitespace at end of text lines
240 nortrim flag retain whitespace at end of text
242 compress flag change newlines in text to spaces
243 nocompress flag don't compress
244 wrap flag Wrap lines that exceed width (default)
245 nowrap flag Do not perform line wrapping
246 split flag don't combine multiple fields into
248 nosplit flag combine multiple fields into
250 newline flag print newline at end of components
251 (this is the default)
252 nonewline flag don't print newline at end of components
253 formatfield string format string for this component
255 decode flag decode text as RFC 2047 encoded
257 addrfield flag field contains addresses
258 datefield flag field contains dates
259 format flag Run component through formatproc filter
261 noformat flag Do not run component through
262 formatproc filter (default)
263 formatarg string Argument to format filter
267 To specify the value of integer\-valued and string\-valued variables,
268 follow their name with an equals\-sign and the value. Integer\-valued
269 variables are given decimal values, while string\-valued variables
270 are given arbitrary text bracketed by double\-quotes. If a value is
271 suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq, then its value is useful in
272 a global\-only or local\-only context (respectively).
277 ignores=component,...
280 specifies a list of components which are never output.
282 The component \*(lqMessageName\*(rq (case\-insensitive) will output the
283 actual message name (file name) preceded by the folder name if one is
284 specified or found in the environment. The format is identical to that
290 The component \*(lqExtras\*(rq will output all of the components of the
291 message which were not matched by explicit components, or included in
292 the ignore list. If this component is not specified, an ignore list is
293 not needed since all non\-specified components will be ignored.
295 If \*(lqnocomponent\*(rq is NOT specified, then the component name will
296 be output as it appears in the format file.
298 The default format file is:
306 The variable \*(lqformatfield\*(rq specifies a format string (see
308 The flag variables \*(lqaddrfield\*(rq and
309 \*(lqdatefield\*(rq (which are mutually exclusive), tell
311 to interpret the escapes in the format string as either addresses or
316 does not apply any formatting string to fields
317 containing address or dates (see
320 fields). Note that this results in faster operation since
322 must parse both addresses and dates in order to apply a format string
325 can be given a default format string for
326 either address or date fields (but not both). To do this, on a global
327 line specify: either the flag addrfield or datefield, along with the
328 appropriate formatfield variable string.
330 The \*(lqformat\*(rq flag specifies that this component will be run through
331 the filter program specified by the
333 profile entry. This filter program is expected to read data on standard
334 input and output data on standard output. Currently the \*(lqformat\*(rq
335 flag is only supported for the \*(lqbody\*(rq component. The component
336 name will be prefixed to the output
338 the filter has been run. The expected use of this is to filter a message
339 body to create more pleasing text to use in a reply message.
340 A suggested filter to use for
345 body:component=">",overflowtext=">",overflowoffset=0,format,nowrap
352 switches can be used to override the
358 option specifies a string that is used as an argument to the format filter.
359 This string is processed by
361 and all of the message components are available for use. Multiple
363 options can be used to build up multiple arguments to the format filter.
367 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
368 ^%nmhetcdir%/mhl.format~^The message template
369 ^or <mh\-dir>/mhl.format~^Rather than the standard template
370 ^$HOME/\&.mh\(ruprofile~^The user profile
372 .SH "PROFILE COMPONENTS"
376 .ta \w'ExtraBigProfileName 'u
377 ^moreproc:~^Program to use as interactive front\-end
378 ^formatproc:~^Program to use as a filter for components that
379 ^^have the \*(lqformat\*(rq flag set.
395 There should be some way to pass `bell' and `clear' information to the
398 The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq
401 The \*(lqformat\*(rq option really should work on something other than the body