** by mhshow as the default method of displaying message bodies
** or message parts of type text/plain.
*/
-char *moreproc = "more";
+char *defaultpager = "more";
/*
** This is the editor invoked by the various message
extern char *context;
extern char *curfolder;
extern char *defaulteditor;
+extern char *defaultpager;
extern char *defaultfolder;
extern char *digestcomps;
extern char *distcomps;
extern char *mhlreply;
extern char *mimetypequery;
extern char *mimetypequeryproc;
-extern char *moreproc;
extern char *msgprot;
extern char *nmhaccessftp;
extern char *nmhstorage;
.IR formfile ]
.RB [ \-width
.IR columns ]
-.RB [ \-moreproc
-.IR program ]
.RI [ files
.IR \&... ]
.RB [ \-version ]
(profile, default: vi)
.RE
.PP
+.BR Pager :
+more
+.RS 5
+This is the program used by
+.B mhl
+to page the
+.B mhl
+formatted message when displaying to a terminal. It is also the default
+program used by
+.B mhshow
+to display message bodies (or message parts) of type text/plain.
+This profile entry overrides the $PAGER environment variable, but gets
+overridden by the $MMHPAGER environment variable.
+.RE
+.PP
.BR Sendmail :
/usr/sbin/sendmail
.RS 5
message to which you are replying.
.RE
.PP
-.BR moreproc :
-more
-.RS 5
-This is the program used by
-.B mhl
-to page the
-.B mhl
-formatted message when displaying to a terminal. It is also the default
-program used by
-.B mhshow
-to display message bodies (or message parts) of type text/plain.
-.RE
-.PP
.BR postproc :
%bindir%/post
.RS 5
the default shell to run
.RE
.PP
+.B $MMHPAGER
+.br
+.B $PAGER
+.RS 5
+These variables (in descending priority) define the default pager to use.
+.RE
+.PP
.B $TERM
.RS 5
This variable tells
.IR formfile ]
.RB [ \-width
.IR columns ]
-.RB [ \-moreproc
-.IR program ]
.RI [ files
.IR \&... ]
.RB [ \-version ]
.B mhl
is outputting to a terminal, then
.B mhl
-will
-cause the
-.I moreproc
-to be placed between the terminal and
+will cause a pager to be placed between the terminal and
.BR mhl .
.PP
-To override the default
-.I moreproc
-and the profile entry, use the
-.B \-moreproc
-.I program
-switch.
-.PP
The
.B \-width
.I width
.nf
.ta 2.4i
.ta \w'ExtraBigProfileName 'u
-^moreproc:~^Program to use as interactive front\-end
+^Pager:~^Program to use as interactive front\-end
.fi
.SH "SEE ALSO"
.PP
If a display string is not found,
.B mhshow
-has several default values:
+has the following default values:
.PP
.RS 5
.nf
-mhshow-show-text/plain: %lmoreproc '%F'
-mhshow-show-message/rfc822: %lshow -file '%F'
+mhshow-show-text/plain: %l<defaultpager> '%F'
+mhshow-show-message/rfc822: %lshow \-file '%F'
.fi
.RE
.PP
or \*(lqbinary\*(rq. The second line tells
.B less
not to warn you
-if it encounters a file that has non-ASCII characters. Then, simply
+if it encounters a file that has non-ASCII characters. Then,
set the
-.I moreproc
+.I Pager
profile entry to
.BR less ,
and it will get
^nmh-private-cache~^Personal directory to store cached external contents
^mhshow-charset-<charset>~^Template for environment to render character sets
^mhshow-show-<type>*~^Template for displaying contents
-^moreproc:~^Default program to display text/plain content
+^Pager:~^Default program to display text/plain content
.fi
.SH "SEE ALSO"
readconfig((struct node **) 0, ib, cp, 1);
lkfclose(ib, ctxpath);
}
+
+ /* Set pager */
+ if (!(cp = getenv("MMHPAGER")) || !*cp) {
+ if (!(cp = context_find("pager")) || !*cp) {
+ if (!(cp = getenv("PAGER")) || !*cp) {
+ cp = defaultpager;
+ }
+ }
+ }
+ defaultpager = cp;
}
{ "lproc", &lproc },
{ "mailproc", &mailproc },
{ "mhlproc", &mhlproc },
- { "moreproc", &moreproc },
+ { "pager", &defaultpager },
{ "postproc", &postproc },
{ "rmmproc", &rmmproc },
{ "sendmail", &sendmail },
{ "folder +folder", 0 },
#define FORMSW 1
{ "form formfile", 0 },
-#define PROGSW 2
- { "moreproc program", 0 },
-#define WIDTHSW 3
+#define WIDTHSW 2
{ "width columns", 0 },
-#define SLEEPSW 4
+#define SLEEPSW 3
{ "sleep seconds", 0 },
-#define VERSIONSW 5
+#define VERSIONSW 4
{ "version", 0 },
-#define HELPSW 6
+#define HELPSW 5
{ "help", 0 },
-#define FORW1SW 7
+#define FORW1SW 6
{ "forward", -7 },
-#define FORW2SW 8
+#define FORW2SW 7
{ "forwall", -7 },
-#define DGSTSW 9
+#define DGSTSW 8
{ "digest list", -6 },
-#define VOLUMSW 10
+#define VOLUMSW 9
{ "volume number", -6 },
-#define ISSUESW 11
+#define ISSUESW 10
{ "issue number", -5 },
-#define NBODYSW 12
+#define NBODYSW 11
{ "nobody", -6 },
{ NULL, 0 }
};
char *cp, *folder = NULL, *form = NULL;
char buf[BUFSIZ], *files[MAXARGS];
char **argp, **arguments;
- char *progsw = NULL;
#ifdef LOCALE
setlocale(LC_ALL, "");
sleepsw = atoi(cp); /* ZERO ok! */
continue;
- case PROGSW:
- if (!(progsw = *argp++) || *progsw == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- continue;
-
case WIDTHSW:
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
SIGNAL2(SIGQUIT, quitser);
}
SIGNAL2(SIGPIPE, pipeser);
- m_popen(progsw ? progsw : moreproc);
+ m_popen(defaultpager);
ontty = PITTY;
} else {
ontty = NOTTY;
{ "mailproc", &mailproc },
{ "mhlproc", &mhlproc },
{ "mimetypequeryproc", &mimetypequeryproc },
- { "moreproc", &moreproc },
{ "msgprot", &msgprot },
+ { "pager", &defaultpager },
{ "postproc", &postproc },
{ "rmmproc", &rmmproc },
{ "sendmail", &sendmail },
#define HELPSW 13
{ "help", 0 },
/*
-** switches for moreproc/mhlproc
-*/
-#define PROGSW 14
- { "moreproc program", -4 },
-#define WIDTHSW 15
- { "width columns", -4 },
-/*
** switches for debugging
*/
-#define DEBUGSW 16
+#define DEBUGSW 14
{ "debug", -5 },
{ NULL, 0 }
};
/* mhshowsbr.c */
extern int serialsw;
-extern char *progsw;
extern int nolist;
extern char *formsw;
formsw = getcpy(etcpath(cp));
continue;
- /*
- ** Switches for moreproc/mhlproc
- */
- case PROGSW:
- if (!(progsw = *argp++) || *progsw == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- continue;
-
- case WIDTHSW:
- if (!(cp = *argp++) || *cp == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- continue;
-
case VERBSW:
verbosw = 1;
continue;
int serialsw = 0;
int nolist = 0;
-
-char *progsw = NULL;
-
-/* flags for moreproc/header display */
char *formsw = NULL;
-
pid_t xpid = 0;
vec[vecp++] = form;
vec[vecp++] = "-nobody";
vec[vecp++] = ct->c_file;
-
- /* If we've specified -moreproc, then just pass that along. */
- if (progsw) {
- vec[vecp++] = "-moreproc";
- vec[vecp++] = progsw;
- }
vec[vecp] = NULL;
fflush(stdout);
** if it is not a text part of a multipart/alternative
*/
if (!alternate || ct->c_subtype == TEXT_PLAIN) {
- snprintf(buffer, sizeof(buffer), "%%p%s '%%F'",
- progsw ? progsw : moreproc);
+ snprintf(buffer, sizeof(buffer), "%%p%s '%%F'", defaultpager);
cp = (ct->c_showproc = getcpy(buffer));
return show_content_aux(ct, serial, alternate, cp, NULL);
}
{ "noheader", 0 },
#define FORMSW 4
{ "form formfile", 0 },
-#define PROGSW 5
- { "moreproc program", 0 },
-#define WIDTHSW 6
- { "width columns", 0 },
-#define SHOWSW 7
+#define SHOWSW 5
{ "showproc program", 0 },
-#define SHOWMIMESW 8
+#define SHOWMIMESW 6
{ "showmimeproc program", 0 },
-#define FILESW 9
+#define FILESW 7
{ "file file", -4 }, /* interface from lproc (whatnow) */
-#define VERSIONSW 10
+#define VERSIONSW 8
{ "version", 0 },
-#define HELPSW 11
+#define HELPSW 9
{ "help", 0 },
{ NULL, 0 }
};
vec[vecp++] = getcpy(etcpath(cp));
continue;
- case PROGSW:
- case WIDTHSW:
- vec[vecp++] = --cp;
- if (!(cp = *argp++) || *cp == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- vec[vecp++] = cp;
- continue;
-
case SHOWSW:
if (!(showproc = *argp++) || *showproc == '-')
adios(NULL, "missing argument to %s",