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