AutoCompressionMode

This modes allow you to edit compressed files. It uncompresses and compresses files on the fly, so the user can use compressed files transparently. To check it out, use ‘M-x auto-compression-mode’ and open a file compressed with gzip (.gz), bzip2 (.bz2) or compress (.Z). It’s important that you end the filename with one of the above named extensions, because that’s what Emacs uses to recognize that the file’s compressed.

Later, consider adding this to your ~/.emacs file:

    (auto-compression-mode 1)

dz files

.dz files are used by RFC 2229 dictd servers. (On a Debian system such files are under /usr/share/dictd.) They’re gzip format, but arranged to allow random access, ie. direct access to chunks in the middle of the file instead of always reading from the start.

Emacs 22 has support for .dz in auto compression mode, so you can visit a .dict.dz and look at the whole thing instead of doing an actual dict search (see CategoryInterface for dict searches). You can get the same in Emacs 21 by copying the jka-compr-compression-info-list entry from Emacs 22, or with a little package

And .dict files are UTF-8, so

    (add-to-list 'file-coding-system-alist '("\\.dict\\'" . utf-8))

(Preferring add-to-list over modify-coding-system-alist as the latter fails in XEmacs 21 if you don’t have utf-8 from MuleUCS or similar.)

gunzip in dired no longer working in ubuntu

In Ubuntu 10.10 I have install via their repository 23.1.1 . It seems at least since this (ubuntu) release I can no longer open .gz files in dired. They fail with (wrong-type-argument characterp “gzip”) I toggled on debug and the full output is:

Debugger entered--Lisp error: (wrong-type-argument characterp “gzip”) signal(wrong-type-argument (characterp “gzip”)) byte-code(”<elided this bit seems to cause WIKI problems>” [error-code local-file visit notfound x file-error 3 signal “Opening input file” “Searching for program” error “Uncompression program `%s’ not found”] 5) jka-compr-insert-file-contents(”/tmp/CNV00001.jpg.key.gz” t nil nil nil) apply(jka-compr-insert-file-contents (”/tmp/CNV00001.jpg.key.gz” t nil nil nil)) jka-compr-handler(insert-file-contents “/tmp/CNV00001.jpg.key.gz” t nil nil nil) insert-file-contents(”/tmp/CNV00001.jpg.key.gz” t) byte-code(” \”)‡” [inhibit-read-only filename t insert-file-contents] 3) find-file-noselect-1(#<buffer CNV00001.jpg.key.gz> “/tmp/CNV00001.jpg.key.gz" nil nil "/tmp/CNV00001.jpg.key.gz” (1084785 2050)) find-file-noselect(”/tmp/CNV00001.jpg.key.gz” nil nil nil) find-file(”/tmp/CNV00001.jpg.key.gz”) dired-advertised-find-file() call-interactively(dired-advertised-find-file nil nil)

It works well in Ubuntu 12.10 (GNU Emacs 24.2.50) --XueFuqiao


CategoryModes CategoryExternalUtilities CategoryInterface