Книга: Learning GNU Emacs, 3rd Edition

5.2.3 Compressing and Uncompressing Files

5.2.3 Compressing and Uncompressing Files

Compressing files saves disk space, and Dired provides an easy way to do it. Put the cursor on the line of the file you want to compress and press Z (for dired-do-compress). Emacs asks the following:

Compress or uncompress filename? (y or n)

Emacs compresses the file if it's not compressed and uncompresses it if it is.[28] Press y to compress or uncompress the current file. Compression happens immediately, so you can watch both the extension and file size change as Emacs compresses the file.

What about editing compressed files? Although it's not on by default, Emacs has an automatic compression/decompression mode called auto-compress mode. To enter it for this session, type M-x auto-compress-mode Enter, which turns automatic compression on. To enable auto-compression automatically, add this line to your .emacs file:

(auto-compression-mode           1)

Оглавление книги


Генерация: 1.389. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз