Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / conf / doc / mhl.rf
1 .\"     @(MHWARNING)
2 .\" @(#)$Id: mhl.rf,v 1.11 1992/12/04 18:59:22 jromine Exp $
3 .SC MHL 1
4 .NA
5 mhl \- produce formatted listings of MH messages
6 .SY
7 @(MHETCPATH)/mhl
8 \%[\-bell] \%[\-nobell]
9 \%[\-clear] \%[\-noclear]
10 \%[\-folder\ +folder]
11 \%[\-form\ formfile]
12 \%[\-length\ lines] \%[\-width\ columns] 
13 \%[\-moreproc\ program] \%[\-nomoreproc]
14 \%[files\ ...]
15 \%[\-help] 
16 .DE
17 \fIMhl\fR is a formatted message listing program.
18 It can be used as a replacement for \fImore\fR\0(1)
19 (the default \fIshowproc\fR\0).
20 As with \fImore\fR,
21 each of the messages specified as arguments (or the standard input) will be
22 output.
23 If more than one message file is specified,
24 the user will be prompted prior to each one,
25 and a <RETURN> or <EOT> will begin the output,
26 with <RETURN> clearing the screen (if appropriate),
27 and <EOT> (usually CTRL\-D) suppressing the screen clear.
28 An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
29 prompting for the next message (if there is one),
30 and a <QUIT> (usually CTRL-\\) will terminate the program (without core dump).
31
32 The `\-bell' option tells \fImhl\fR to ring the terminal's bell at the end of each page,
33 while the `\-clear' option tells \fImhl\fR to clear the scree at the end of
34 each page (or output a formfeed after each message).
35 Both of these switches (and their inverse counterparts)
36 take effect only if the profile entry \fImoreproc\fR is defined but empty,
37 and \fImhl\fR is outputting to a terminal.
38 If the \fImoreproc\fR entry is defined and non-empty,
39 and \fImhl\fR is outputting to a terminal,
40 then \fImhl\fR will cause the \fImoreproc\fR to be placed between the
41 terminal and \fImhl\fR and the switches are ignored.
42 Furthermore,
43 if the `\-clear' switch is used and \fImhl's\fR output is directed to a
44 terminal,
45 then \fImhl\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fR
46 envariables to determine the user's
47 terminal type in order to find out how to clear the screen.
48 If the `\-clear' switch is used and \fImhl's\fR output is not directed to
49 a terminal (e.g., a pipe or a file),
50 then \fImhl\fR will send a formfeed after each message.
51
52 To override the default \fImoreproc\fR and the profile entry,
53 use the `\-moreproc\ program' switch.
54 Note that \fImhl\fR will never start a \fImoreproc\fR if invoked on a
55 hardcopy terminal.
56
57 The `\-length\ length' and `\-width\ width' switches set the screen length and
58 width, respectively.
59 These default to the values indicated by \fB$TERMCAP\fR,
60 if appropriate,
61 otherwise they default to 40 and 80, respectively.
62
63 The default format file used by \fImhl\fR is called \fImhl.format\fR
64 (which is first searched for in the user's \fIMH\fR directory,
65 and then sought in the \fI@(MHETCPATH)\fR directory),
66 this can be changed by using the `\-form\ formatfile' switch.
67
68 Finally,
69 the `\-folder\ +folder' switch sets the \fIMH\fR folder name,
70 which is used for the \*(lqmessagename:\*(rq field described below.
71 The envariable \fB$mhfolder\fR is consulted for the default value,
72 which \fIshow\fR, \fInext\fR, and \fIprev\fR initialize appropriately.
73
74 \fIMhl\fR operates in two phases:
75 1) read and parse the format file,
76 and 2) process each message (file).
77 During phase 1,
78 an internal description of the format is produced as a structured list.
79 In phase 2,
80 this list is walked for each message,
81 outputting message information under the format constraints from the format
82 file.
83
84 The \*(lqmhl.format\*(rq form file contains information controlling
85 screen clearing, screen size, wrap\-around control, transparent text,
86 component ordering, and component formatting.
87 Also, a list of components to ignore may be specified,
88 and a couple of \*(lqspecial\*(rq components are defined to provide added
89 functionality.
90 Message output will be in the order specified by the order in the format file.
91
92 Each line of mhl.format has one of the formats:
93
94      ;comment
95      :cleartext
96      variable[,variable...]
97      component:[variable,...]
98
99 A line beginning with a `;' is a comment, and is ignored.
100 A line beginning with a `:' is clear text,
101 and is output exactly as is.
102 A line containing only a `:' produces a blank line in the output.
103 A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
104 component,
105 and finally, remaining lines define the global environment.
106
107 For example, the line:
108
109 .ti +.5i
110 width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
111
112 defines the screen size to be 80 columns by 40 rows,
113 specifies that the screen should be cleared prior to each page,
114 that the overflow indentation is 5,
115 and that overflow text should be flagged with \*(lq***\*(rq.
116
117 Following are all of the current variables and their arguments.
118 If they follow a component,
119 they apply only to that component,
120 otherwise, their affect is global.
121 Since the whole format is parsed before any output processing,
122 the last global switch setting for a variable applies to the whole message
123 if that variable is used in a global context
124 (i.e., bell, clearscreen, width, length).
125
126 .nf
127 .in +.5i
128 .ta \w'noclearscreen  'u +\w'integer/G  'u
129 \fIvariable\fR  \fItype\fR      \fIsemantics\fR
130 width   integer screen width or component width
131 length  integer screen length or component length
132 offset  integer positions to indent \*(lqcomponent: \*(rq
133 overflowtext    string  text to use at the beginning of an
134                 overflow line
135 overflowoffset  integer positions to indent overflow lines
136 compwidth       integer positions to indent component text
137                 after the first line is output
138 uppercase       flag    output text of this component in all
139                 upper case
140 nouppercase     flag    don't uppercase
141 clearscreen     flag/G  clear the screen prior to each page
142 noclearscreen   flag/G  don't clearscreen
143 bell    flag/G  ring the bell at the end of each page
144 nobell  flag/G  don't bell
145 component       string/L        name to use instead of \*(lqcomponent\*(rq for
146                 this component
147 nocomponent     flag    don't output \*(lqcomponent: \*(rq for this
148                 component
149 center  flag    center component on line (works for
150                 one\-line components only)
151 nocenter        flag    don't center
152 leftadjust      flag    strip off leading whitespace on each
153                 line of text
154 noleftadjust    flag    don't leftadjust
155 compress        flag    change newlines in text to spaces
156 nocompress      flag    don't compress
157 split   flag    don't combine multiple fields into a single field
158 nosplit flag    combine multiple fields into a single field
159 newline flag    print newline at end of components (default)
160 nonewline       flag    don't print newline at end of components
161 formatfield     string  format string for this component (see below)
162 addrfield       flag    field contains addresses
163 datefield       flag    field contains dates
164 .re
165 .in -.5i
166 .fi
167
168 To specify the value of integer\-valued and string\-valued variables,
169 follow their name with an equals\-sign and the value.
170 Integer\-valued variables are given decimal values,
171 while string\-valued variables are given arbitrary text bracketed by
172 double\-quotes.
173 If a value is suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq,
174 then its value is useful in a global\-only or local\-only context
175 (respectively).
176
177 A line of the form:
178
179     ignores=component,...
180
181 specifies a list of components which are never output.
182
183 The component \*(lqMessageName\*(rq (case\-insensitive)
184 will output the actual message name (file name) preceded by
185 the folder name if one is specified or found in the environment.
186 The format is identical to that produced by the `\-header' option to
187 \fIshow\fR.
188
189 The component \*(lqExtras\*(rq will output all of the components of the message
190 which were not matched by explicit components,
191 or included in the ignore list.
192 If this component is not specified,
193 an ignore list is not needed since all non\-specified components will be
194 ignored.
195
196 If \*(lqnocomponent\*(rq is NOT specified, then the component name will be
197 output as it appears in the format file.
198
199 The default format is:
200
201 .nf
202 .in +.5i
203 .ne 15
204 .eo
205 .so @(MHETCPATH)/mhl.format
206 .ec
207 .in -.5i
208 .fi
209
210 The variable \*(lqformatfield\*(rq specifies a format string
211 (see \fImh\-format\fR\0(5)).
212 The flag variables \*(lqaddrfield\*(rq and \*(lqdatefield\*(rq
213 (which are mutually exclusive),
214 tell \fImhl\fR to interpret the escapes in the format string
215 as either addresses or dates, respectively.
216
217 By default,
218 \fImhl\fR does not apply any formatting string to fields containing address or
219 dates (see \fImh\-mail\fR\0(5) for a list of these fields).
220 Note that this results in faster operation
221 since \fImhl\fR must parse both addresses and dates in order to apply a
222 format string to them.
223 If desired,
224 \fImhl\fR can be given a default format string for either address or date
225 fields (but not both).
226 To do this,
227 on a global line specify: either the flag addrfield or datefield,
228 along with the apropriate formatfield variable string.
229 .Fi
230 ^@(MHETCPATH)/mhl.format~^The message template
231 ^or <mh\-dir>/mhl.format~^Rather than the standard template
232 ^$HOME/\&.mh\(ruprofile~^The user profile
233 .Pr
234 ^moreproc:~^Program to use as interactive front\-end
235 .Sa
236 show(1), ap(8), dp(8)
237 .De
238 `\-bell'
239 .Ds
240 `\-noclear'
241 .Ds
242 `\-length 40'
243 .Ds
244 `\-width 80'
245 .Co
246 None
247 .Bu
248 There should be some way to pass `bell' and `clear' information to the 
249 front\-end.
250
251 On hosts where \fIMH\fR was configured with the BERK option,
252 address parsing is not enabled.
253
254 The \*(lqnonewline\*(rq option interacts badly 
255 with \*(lqcompress\*(rq and \*(lqsplit\*(rq.
256 .En