Просмотр содержимого архива gzip в режиме hexl - PullRequest
0 голосов
/ 28 августа 2010

Я хочу написать функцию, аналогичную hexl-find-file, которая откроет сжатый файл и покажет содержимое в hexl-режиме.Как бы я это сделал?

Ответы [ 2 ]

2 голосов
/ 28 августа 2010

Это у вас работает?

(require 'jka-compr)
(defun hexl-find-file ()
  "call find file and then jump into hexl mode"
  (interactive)
  (call-interactively 'find-file)
  (hexl-mode 1))

'jka-compr обеспечивает плавную обработку сжатых файлов, а 'hexl-find-file просто открывает файл и включает hexl-mode.

0 голосов
/ 29 августа 2010

Включить режим автоматического сжатия перед запуском hexl-find-file?

,----[ C-h f auto-compression-mode RET ]
| `auto-compression-mode' is an interactive compiled Lisp function
|   -- loaded from "/usr/share/xemacs21/xemacs-packages/lisp/os-utils/auto-autoloads"
| (auto-compression-mode &optional ARG)
| 
| Documentation:
| Toggle automatic file compression and uncompression.
| With prefix argument ARG, turn auto compression on if positive, else off.
| Returns the new status of auto compression (non-nil means on).
| 
| Invoked with:
| 
| M-x auto-compression-mode
`----
...