以 hexl 模式查看 gzip 存档的内容

发布于 2024-09-16 01:57:10 字数 86 浏览 3 评论 0原文

我想编写一个类似 hexl-find-file 的函数,它将打开一个 gzip 压缩文件并以 hexl 模式显示内容。我该怎么做呢?

I want to write a function, similar hexl-find-file, that will open a gzipped file and show the contents in the hexl-mode. How would I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

金兰素衣 2024-09-23 01:57:10

这对你有用吗?

(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 >。

Does this work for you?

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

The 'jka-compr provides the seamless compressed file handling, and the 'hexl-find-file just opens the file and turns on hexl-mode.

蛮可爱 2024-09-23 01:57:10

在运行 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
`----

Turn on auto-compression-mode before you run 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
`----
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文