Xref: utzoo gnu.emacs.help:697 comp.emacs:9808
Path: utzoo!utgpu!watserv1!watmath!uunet!tut.cis.ohio-state.edu!uahtitan.ai.mit.edu!bennett
From: bennett@uahtitan.ai.mit.edu (Mark Bennett)
Newsgroups: gnu.emacs.help,comp.emacs
Subject: M-x manual-entry - the "best" solution
Message-ID: <9101022250.AA13876@uahtitan.uah.edu>
Date: 3 Jan 91 00:50:39 GMT
Sender: bennett@tut.cis.ohio-state.edu
Followup-To: gnu.emacs.help
Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
Lines: 45


Hi once again,

	I recently posted a request for help with the M-x manual-entry.
The problem I was having was because the /usr/man/cat?/*
files were *BOTH* compressed and did *NOT* have either .Z or .z
extentions on their filenames.

Thanks to all who sent me help. I received some solutions that worked,
some that nearly worked, and some that probably would have worked if I
was enough of a hacker to fully understand the advice given. To me the
"best" solution (simplest, most explicit directions, most generic)
came from hallvard@ifi.uio.no (Hallvard B Furuseth).

Simply change the part of the man.el file that follows 

	(defun insert-man-file (name)
  	;; Insert manual file (unpacked as necessary) into buffer

from what it is to 

	  (let (end)
	    (cond ((or (equal (substring name -2) ".Z")
		       (string-match "/cat[0-9][a-z]?\\.Z/" name))
		   (call-process "zcat" name t nil))
		  ((equal (substring name -2) ".z")
		   (call-process "pcat" nil t nil name))
		  ((progn
		     (setq end (+ (nth 1 (insert-file-contents name)) (point)))
		     ;; Check magic number of file
		     (looking-at "\037\235"))
		   (delete-region (point) end)
		   (call-process "zcat" name t nil)))))

The last four lines are basically what fixed my problem (if I
understand it correctly).

Thnaks again!

Mark J. Bennett
Center for Microgravity and Materials Research
The University of Alabama in Huntsville
Huntsville, AL 35899
(205)895-6889
bennett@uahtitan.uah.edu   (129.66.23.6)