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