2010-08-28 30 views

回答

2

這是否適合您?

(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

在運行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 
`---- 
+0

所以,這並不實際工作。 'auto-compression-mode'很好,但是指向GZipped文件的hexl-find-file會打開壓縮文件進行十六進制編輯,而不是原始的未壓縮文件。我在OS X上使用GNU Emacs 23.2.1測試了這個版本。 – 2010-08-29 05:42:03

+0

如果不先測試它,我不會發布答案。它在XEmacs 21.5(Debian GNU/Linux)中按預期工作(在用hexl模式顯示gzip的文件之前解壓縮)。 – asjo 2010-08-29 15:37:33