Control: tag -1 pending

On Wed, Oct 02, 2013 at 04:15:01PM +1000, Kevin Ryde wrote:
> This is an idea for /etc/mailcap entries to run "man" on man pages.
> It allows for example
> 
>     see /usr/share/man/man1/man.1.gz
> 
> to display with man in either X or a tty, and also non-interactive like
> the following (though groff-base trumps this just yet ...)
> 
>     run-mailcap --action=cat /usr/share/man/man1/man.1.gz
> 
> The debian/man-db.mime file below can be taken by dh_installmime to
> install as /usr/lib/mime/packages/man-db.

Thanks!  I've applied this more or less verbatim, although I added
text/troff lines to match each of the application/x-troff-man lines, as
that seems to be what's needed with current file(1).

  
http://anonscm.debian.org/cgit/pkg-man-db/man-db.git/commit/?id=af63b7267097fc2a56607a31f3da8b3d5384a276

> /usr/lib/mime/packages/groff-base has a "copiousoutput" entry at
> priority=5 which is above what I propose here for man non-interactive,
> which means for now the groff bit has precedence in the --action=cat
> above.
> 
> I think the groff should be lower, but that will be a matter of groff
> and man-db cooperating.  The priority levels apply before the output
> style is considered, so usually any copiousoutput should be below any
> interactive viewing.

Well, I maintain groff as well, so send me patches.  I don't really use
mime-support much myself, so I'm happy to take guidance from those who
do.

> # "man -X" is only priority=6 since the gxditview it runs is rather
> # basic and perhaps something more sophisticated could be higher.  The
> # X entry is before the tty so the X is preferred under X.  (The tty
> # one still works there, in its declared needsterminal.)
> #
> # "-X100" seems to make better output than the default -X 75 dpi.
> # Dunno if that's some font dodginess or matching the X server's
> # advertised screen size resolution or something.
> #
> # "test -e gxditview" because it's in the "groff" package which is
> # only a Suggests of man-db and so may not be available.

Did you consider something like -Tpdf, which generally looks much nicer?
Is it possible to chain MIME handlers, so that we can say "this command
converts text/troff into image/pdf, and then you should go and work out
how to display image/pdf"?

> # "-Tascii" gives backspace overstriking, so use "col -b" to undo
> # that.  Piping to col also means "man" has a non-tty output and so
> # does not run its usual "more" etc pager, ensuring this entry is
> # non-interactive.
> #
> application/x-troff-man; /usr/bin/man -Tascii -l '%s' | col -b; 
> copiousoutput; description=Man page; priority=2

Why not -Tutf8 here?

Thanks,

-- 
Colin Watson                                       [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to