I wrote:
>
> I see "groffer" does many things.

I tried the mailcap lines below.  Intended to be "works everywhere"
level, so don't try to divine user preferences or do anything fragile
with character sets or predict $PAGER capability.  The user can copy to
~/.mailcap and adapt (that being entirely normal to select mail type
viewing preferences ...).

The X form gets a warning from grog for me, but I think is either its
fault or the way groffer runs it.


# groffer looks in the input for needed preprocessors (eg. tbl).
# --mode=X uses gxditview which is included in the groff package.
# groffer has other mode options to easily run other graphics viewers.
# -TX100 anticipates a 100dpi screen.  Can -TX75 if desired.
application/x-troff-ms; groffer --mode=X -TX100 -ms; test=test -n "$DISPLAY"; 
description=Troff ms
application/x-troff-me; groffer --mode=X -TX100 -me; test=test -n "$DISPLAY"; 
description=Troff me
#
# -Tascii output for maximum portability.
# -P -c is option -c to grotty for no SGR escapes (but still backspacing).
# col -b collapses backspacing to plain text.
# Both SGR and backspacing are undesirable for output to a file or an
# unknown viewer (such as a mail reader).
application/x-troff-ms; groffer --mode=text -Tascii -P -c -ms '%s' | col -b; 
copiousoutput; description=Troff ms; priority=2
application/x-troff-me; groffer --mode=text -Tascii -P -c -me '%s' | col -b; 
copiousoutput; description=Troff me; priority=2

Reply via email to