source: trunk/third/nmh/man/mhl.man @ 12455

Revision 12455, 9.2 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
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
10mhl \- 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
32messages.  It is the default method of displaying text messages for
33\fInmh\fR (it is the default \fIshowproc\fR).
34
35As with \fImore\fR, each of the messages specified as arguments (or
36the standard input) will be output.  If more than one message file is
37specified, the user will be prompted prior to each one, and a <RETURN>
38or <EOT> will begin the output, with <RETURN> clearing the screen (if
39appropriate), and <EOT> (usually CTRL\-D) suppressing the screen clear.
40An <INTERRUPT> (usually CTRL\-C) will abort the current message output,
41prompting for the next message (if there is one), and a <QUIT> (usually
42CTRL-\\) will terminate the program (without core dump).
43
44The `\-bell' option tells \fImhl\fR to ring the terminal's bell at the
45end of each page, while the `\-clear' option tells \fImhl\fR to clear the
46scree at the end of each page (or output a formfeed after each message).
47Both of these switches (and their inverse counterparts) take effect only
48if the profile entry \fImoreproc\fR is defined but empty, and \fImhl\fR
49is outputting to a terminal.  If the \fImoreproc\fR entry is defined and
50non-empty, and \fImhl\fR is outputting to a terminal, then \fImhl\fR will
51cause the \fImoreproc\fR to be placed between the terminal and \fImhl\fR
52and the switches are ignored.  Furthermore, if the `\-clear' switch is
53used and \fImhl's\fR output is directed to a terminal, then \fImhl\fR
54will consult the \fB$TERM\fR and \fB$TERMCAP\fR environment variables
55to determine the user's terminal type in order to find out how to clear
56the screen.  If the `\-clear' switch is used and \fImhl's\fR output is
57not directed to a terminal (e.g., a pipe or a file), then \fImhl\fR will
58send a formfeed after each message.
59
60To 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
64The `\-length\ length' and `\-width\ width' switches set the screen
65length and width, respectively.  These default to the values indicated
66by \fB$TERMCAP\fR, if appropriate, otherwise they default to 40 and
6780, respectively.
68
69The 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
71directory, and will then search in the directory %etcdir%.  This default
72can be changed by using the `\-form\ formatfile' switch.
73
74Finally, the `\-folder\ +folder' switch sets the \fInmh\fR folder name,
75which is used for the \*(lqmessagename:\*(rq field described below.  The
76environment variable \fB$mhfolder\fR is consulted for the default value,
77which \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
802) process each message (file).  During phase 1, an internal description
81of the format is produced as a structured list.  In phase 2, this list
82is walked for each message, outputting message information under the
83format constraints from the format file.
84
85The format file can contain information controlling screen clearing,
86screen size, wrap\-around control, transparent text, component ordering,
87and component formatting.  Also, a list of components to ignore may be
88specified, and a couple of \*(lqspecial\*(rq components are defined
89to provide added functionality.  Message output will be in the order
90specified by the order in the format file.
91
92Each line of a format file has one of the following forms:
93
94     ;comment
95     :cleartext
96     variable[,variable...]
97     component:[variable,...]
98
99A line beginning with a `;' is a comment, and is ignored.
100A line beginning with a `:' is clear text,
101and is output exactly as is.
102A line containing only a `:' produces a blank line in the output.
103A line beginning with \*(lqcomponent:\*(rq defines the format for the specified
104component,
105and finally, remaining lines define the global environment.
106
107For example, the line:
108
109.ti +.5i
110width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5
111
112defines the screen size to be 80 columns by 40 rows, specifies that the
113screen should be cleared prior to each page, that the overflow indentation
114is 5, and that overflow text should be flagged with \*(lq***\*(rq.
115
116Following are all of the current variables and their arguments.  If they
117follow a component, they apply only to that component, otherwise, their
118affect is global.  Since the whole format is parsed before any output
119processing, the last global switch setting for a variable applies to
120the whole message if that variable is used in a global context (i.e.,
121bell, 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
127width   integer screen width or component width
128length  integer screen length or component length
129offset  integer positions to indent \*(lqcomponent: \*(rq
130overflowtext    string  text to use at the beginning of an
131                overflow line
132overflowoffset  integer positions to indent overflow lines
133compwidth       integer positions to indent component text
134                after the first line is output
135uppercase       flag    output text of this component in all
136                upper case
137nouppercase     flag    don't uppercase
138clearscreen     flag/G  clear the screen prior to each page
139noclearscreen   flag/G  don't clearscreen
140bell    flag/G  ring the bell at the end of each page
141nobell  flag/G  don't bell
142component       string/L        name to use instead of \*(lqcomponent\*(rq for
143                this component
144nocomponent     flag    don't output \*(lqcomponent: \*(rq for this
145                component
146center  flag    center component on line (works for
147                one\-line components only)
148nocenter        flag    don't center
149leftadjust      flag    strip off leading whitespace on each
150                line of text
151noleftadjust    flag    don't leftadjust
152compress        flag    change newlines in text to spaces
153nocompress      flag    don't compress
154split   flag    don't combine multiple fields into
155                a single field
156nosplit flag    combine multiple fields into
157                a single field
158newline flag    print newline at end of components
159                (this is the default)
160nonewline       flag    don't print newline at end of components
161formatfield     string  format string for this component
162                (see below)
163decode  flag    decode text as RFC-2047 encoded
164                header field
165addrfield       flag    field contains addresses
166datefield       flag    field contains dates
167.re
168.in -.5i
169.fi
170
171To specify the value of integer\-valued and string\-valued variables,
172follow their name with an equals\-sign and the value.  Integer\-valued
173variables are given decimal values, while string\-valued variables
174are given arbitrary text bracketed by double\-quotes.  If a value is
175suffixed by \*(lq/G\*(rq or \*(lq/L\*(rq, then its value is useful in
176a global\-only or local\-only context (respectively).
177
178A line of the form:
179
180    ignores=component,...
181
182specifies a list of components which are never output.
183
184The component \*(lqMessageName\*(rq (case\-insensitive) will output the
185actual message name (file name) preceded by the folder name if one is
186specified or found in the environment.  The format is identical to that
187produced by the `\-header' option to \fIshow\fR.
188
189The component \*(lqExtras\*(rq will output all of the components of the
190message which were not matched by explicit components, or included in
191the ignore list.  If this component is not specified, an ignore list is
192not needed since all non\-specified components will be ignored.
193
194If \*(lqnocomponent\*(rq is NOT specified, then the component name will
195be output as it appears in the format file.
196
197The 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
208The 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
211to interpret the escapes in the format string as either addresses or
212dates, respectively.
213
214By default, \fImhl\fR does not apply any formatting string to fields
215containing address or dates (see \fImh\-mail\fR\0(5) for a list of these
216fields).  Note that this results in faster operation since \fImhl\fR
217must parse both addresses and dates in order to apply a format string
218to them.  If desired, \fImhl\fR can be given a default format string for
219either address or date fields (but not both).  To do this, on a global
220line specify: either the flag addrfield or datefield, along with the
221appropriate 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
229show(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
239None
240.Bu
241There should be some way to pass `bell' and `clear' information to the
242front\-end.
243
244The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq
245and \*(lqsplit\*(rq.
246.En
Note: See TracBrowser for help on using the repository browser.