🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #3600

Re: find-file-maybe-uncompress? (for Gnu under unix)

#3600
From: Jim Patterson
Date: Thu, 07 Jan 1993 20:53
28 lines
1494 bytes
schrag@cs.utexas.edu (Robert C. Schrag) writes:
: Does anybody have a version of find-file (or find-file-noselect) that
: will automatically uncompress the file, if it has the .Z suffix?

Check your local Emacs lisp archive for a module called "zcat.el".
This contains a routine called zcat-buffer that is installed as a
minor mode (it doesn't actually replace find-file). It's installed like
this at our site:

	(autoload 'zcat-buffer "site/zcat"
	  "Uncompresses contents of buffer,
       respecting read-only status (not loaded)."
	  t)

	(setq auto-mode-alist
		  (append auto-mode-alist '(
			  ("\\.Z$" . zcat-buffer)
		   )))

Once this is done during setup, zcat-buffer will automatically be
invoked on any file with a .Z extension (quite neat).  We've put it
into our site-init.el file.

--
Jim Patterson                  Cognos Incorporated
Sr Consulting Engineer         P.O. BOX 9707
UUNET:jimp@cognos.COM          3755 Riverside Drive
PHONE:(613)738-1338 x3385      Ottawa, Ont  K1G 3Z4
Technical Details
Message-ID: <1993Jan7.205343.28668@cognos.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!cognos!jimp
References: <lkolp9INNhg1@bathtub.cs.utexas.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.emacs
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!cognos!jimp
From: jimp@cognos.COM (Jim Patterson)
Subject: Re: find-file-maybe-uncompress? (for Gnu under unix)
Message-ID: <1993Jan7.205343.28668@cognos.com>
Sender: news@cognos.com (News Administrator)
Nntp-Posting-Host: asterix
Organization: Cognos Incorporated, Ottawa CANADA
X-Newsreader: Tin 1.1 PL3
References: <lkolp9INNhg1@bathtub.cs.utexas.edu>
Date: Thu, 7 Jan 1993 20:53:43 GMT
Lines: 28