From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: How do I decode an NROFF file for viewing? Date: Sat, 19 Jul 2008 13:39:27 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8438fb2d-677c-497f-9214-78339f72475f@b2g2000prf.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1216500041 23634 80.91.229.12 (19 Jul 2008 20:40:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jul 2008 20:40:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 19 22:41:28 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKJFA-00071a-8k for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jul 2008 22:41:28 +0200 Original-Received: from localhost ([127.0.0.1]:43425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKJEH-00017K-Dc for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jul 2008 16:40:33 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b2g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1216499967 3580 127.0.0.1 (19 Jul 2008 20:39:27 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 19 Jul 2008 20:39:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b2g2000prf.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:160390 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55736 Archived-At: Alan Mackenzie wrote: > The M-x man command does 2 things: > (i) It finds the pertinent file using complicated, difficult, and > obscure algorithms; > (ii) It converts the markup stuff in the file to a readable form and > displays it. > > I have an Nroff file, mount.8, loaded into Emacs. How do I do part > (ii) of the above, and get it nicely displayed? possibly others have elisp answers on the spot. But here's what i know: you can use WoMan to read man pages in emacs. The manual-entry command calls shell tool to do its job. WoMan is written entirely in elisp. So, this means you could lookup WoMan's source code to see what it does if you need it. Alternative solution is to call shell command to process it first then display the result plain text file in emacs. Here's some tips i wrote some 10 years ago: =E2=80=A2 How to get a text output of a man page? =E2=80=9Cman ls | col -b=E2=80=9D. The =E2=80=9Ccol -b=E2=80=9D formats the= man page to plain text (rid of control chars). =E2=80=A2 How to read a non-compressed man page without the =E2=80=9Cman=E2= =80=9D command? =E2=80=9Cnroff -man n43921.man | col -b=E2=80=9D =E2=80=A2 This is convenient when you need to read a man-page file once without adding the dir to your $MANPATH. =E2=80=A2 How to read a compressed man page without the =E2=80=9Cman=E2=80= =9D command? =E2=80=9Ccat n43921.1 | compress -cd - | nroff -man | col -b=E2=80=9D =E2=80=A2 How to read a unformatted man page? a possible solution: =E2=80=9Cnroff -man ftpshut.8=E2=80=9D The =E2=80=9Cman=E2=80=9D command is essentially =E2=80=9Cnroff -e -man fil= e_name | more -s=E2=80=9D. http://xahlee.org/UnixResource_dir/unix_tips.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84