home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / emacs / 3925 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.4 KB  |  42 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!uunet.ca!cognos!jimp
  3. From: jimp@cognos.COM (Jim Patterson)
  4. Subject: Re: find-file-maybe-uncompress? (for Gnu under unix)
  5. Message-ID: <1993Jan7.205343.28668@cognos.com>
  6. Sender: news@cognos.com (News Administrator)
  7. Nntp-Posting-Host: asterix
  8. Organization: Cognos Incorporated, Ottawa CANADA
  9. X-Newsreader: Tin 1.1 PL3
  10. References: <lkolp9INNhg1@bathtub.cs.utexas.edu>
  11. Date: Thu, 7 Jan 1993 20:53:43 GMT
  12. Lines: 28
  13.  
  14. schrag@cs.utexas.edu (Robert C. Schrag) writes:
  15. : Does anybody have a version of find-file (or find-file-noselect) that
  16. : will automatically uncompress the file, if it has the .Z suffix?
  17.  
  18. Check your local Emacs lisp archive for a module called "zcat.el".
  19. This contains a routine called zcat-buffer that is installed as a
  20. minor mode (it doesn't actually replace find-file). It's installed like
  21. this at our site:
  22.  
  23.     (autoload 'zcat-buffer "site/zcat"
  24.       "Uncompresses contents of buffer,
  25.        respecting read-only status (not loaded)."
  26.       t)
  27.  
  28.     (setq auto-mode-alist
  29.           (append auto-mode-alist '(
  30.               ("\\.Z$" . zcat-buffer)
  31.            )))
  32.  
  33. Once this is done during setup, zcat-buffer will automatically be
  34. invoked on any file with a .Z extension (quite neat).  We've put it
  35. into our site-init.el file.
  36.  
  37. --
  38. Jim Patterson                  Cognos Incorporated
  39. Sr Consulting Engineer         P.O. BOX 9707
  40. UUNET:jimp@cognos.COM          3755 Riverside Drive
  41. PHONE:(613)738-1338 x3385      Ottawa, Ont  K1G 3Z4
  42.