´ÙÀ½ ÀÌÀü Â÷·Ê

6. Bzip2¸¦ emacs¿Í °°ÀÌ ¾²±â

6.1 ¸ðµÎ¸¦ À§ÇØ emacs ¹Ù²Ù±â:

³ª´Â ÀÚµ¿¾ÐÃà¸ðµå¸¦ Ãß°¡ÇÑ jka-compr.el ÆÐÄ¡¿¡ µû¶ó ½è´Ù. ºÎÀμ­: ³ª´Â emacs-20.0¿¡¼­¸¸ Å×½ºÆ®¸¦ ÇغôÙ, ±×·¯³ª ´Ù¸¥ ¹öÀü¿¡ ºñ½Á ÇÏ°Ô Á¢±ÙÇÏÁö ¸øÇÑ´Ù°í ¹ÏÀ» ÀÌÀ¯°¡ ¾ø´Ù. ÀÌ °ÍÀ» ½á¶ó,

  1. emacs-20.2/lisp ¼Ò½º µð·ºÅ丮¿¡ °¡¶ó (´ç½ÅÀÌ tarÀ» Ǭ °÷)
  2. jka-compr.el.diff ºÎ¸£´Â ÆÄÀÏÀÇ ¾Æ·¡¿¡ ÆÐÄ¡¸¦ ³õ¾Æ¶ó (±× °ÍÀº Àú ÆÄÀÏ ¿¡ ´Üµ¶À¸·Î ÀÖ¾î¾ßÇÑ´Ù ;).
  3. Çضó patch < jka-compr.el.diff
  4. Emacs¸¦ ½ÃÀÛÇضó, ±×¸®°í Çضó M-x byte-compile-file jka-compr.el
  5. Emacs¸¦ Á¾·áÇضó.
  6. ´ç½ÅÀÇ ÃÖÃÊÀÇ jka-compr.elc¸¦ ¹ö±×ÀÇ ÄÉÀ̽º¾ÈÀÇ ¾ÈÀüÇÑ °÷À¸·Î ¿Å°Ü¶ó.
  7. »õ·Î¿î jka-compr.elc¿Í ±× °ÍÀ» ¹Ù²ã¶ó.
  8. Áñ°Ü¶ó!


   --- jka-compr.el        Sat Jul 26 17:02:39 1997
     +++ jka-compr.el.new    Thu Feb  5 17:44:35 1998
     @@ -44,7 +44,7 @@
      ;; The variable, jka-compr-compression-info-list can be used to
      ;; customize jka-compr to work with other compression programs.
      ;; The default value of this variable allows jka-compr to work with
     -;; Unix compress and gzip.
     +;; Unix compress and gzip.  David Fetter added bzip2 support :)
      ;;
      ;; If you are concerned about the stderr output of gzip and other
      ;; compression/decompression programs showing up in your buffers, you
     @@ -121,7 +121,9 @@

    ;;; I have this defined so that .Z files are assumed to be in unix
     -;;; compress format; and .gz files, in gzip format.
     +;;; compress format; and .gz files, in gzip format, and .bz2 files,
     +;;; in the snappy new bzip2 format from <url url="http://www.muraroa.demon.co.uk" name="www.muraroa.demon.co.uk" >.
     +;;; Keep up the good work, people!
      (defcustom jka-compr-compression-info-list
        ;;[regexp
        ;; compr-message  compr-prog  compr-args
     @@ -131,6 +133,10 @@
           "compressing"    "compress"     ("-c")
           "uncompressing"  "uncompress"   ("-c")
           nil t]
     +    ["\\.bz2\\'"
     +     "bzip2ing"        "bzip2"         ("")
     +     "bunzip2ing"      "bzip2"         ("-d")
     +     nil t]
          ["\\.tgz\\'"
           "zipping"        "gzip"         ("-c" "-q")
           "unzipping"      "gzip"         ("-c" "-q" "-d")

6.2 ÇÑ »ç¶÷À» À§ÇØ emacs ¹Ù²Ù±â:

Kampsax Technology¿¡ ÀÖ´Â ½Ã½ºÅÛ ÇÁ·Î±×·¡¸ÓÀÎ Ulrik Dickow, ukd@kampsax.dk <mailto:ukdATkampsax.dk> ¿¡°Ô ÀÌ°Í¿¡ °üÇØ °¨»çÇÑ´Ù: ´ç½ÅÀÌ ½Ã½ºÅÛ°ü¸®ÀÚ°¡ ¾Æ´Ò¶§ ±×°ÍÀ» ¸¸µé¸é bzip2¸¦ ÀÚµ¿ÀûÀ¸·Î ¾µ ¼ö ÀÖ´Ù. ´ç½ÅÀÇ .emacs ÆÄÀÏ´ÙÀ½¿¡ Áö±Ý Ãß°¡Çضó.


  ;; Automatic (un)compression on loading/saving files (gzip(1) and similar)
  ;; We start it in the off state, so that bzip2(1) support can be added.
  ;; Code thrown together by Ulrik Dickow for ~/.emacs with Emacs 19.34.
  ;; Should work with many older and newer Emacsen too.  No warranty though.
  ;;
  (if (fboundp 'auto-compression-mode) ; Emacs 19.30+
      (auto-compression-mode 0)
    (require 'jka-compr)
    (toggle-auto-compression 0))
  ;; Now add bzip2 support and turn auto compression back on.
  (add-to-list 'jka-compr-compression-info-list
               ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
                "zipping"        "bzip2"         ()
                "unzipping"      "bzip2"         ("-d")
                nil t])
  (toggle-auto-compression 1 t)


´ÙÀ½ ÀÌÀü Â÷·Ê