GNU bug report logs -
#7252
hexl-revert-buffer
Previous Next
Reported by: Daiki Ueno <ueno <at> unixuser.org>
Date: Wed, 20 Oct 2010 06:01:02 UTC
Severity: normal
Done: Daiki Ueno <ueno <at> unixuser.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 21 Oct 2010 11:42:14 +0900
with message-id <m3vd4wuv09.fsf-ueno <at> unixuser.org>
and subject line Re: bug#7252: hexl-revert-buffer
has caused the GNU bug report #7252,
regarding hexl-revert-buffer
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
7252: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7252
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
If I open a ZIP file with M-x hexl-find-file and then M-x revert-buffer,
I see hexified file list generated by arc-mode, instead of raw ZIP data.
This behavior is surprising for me and it is cumbersome to do M-x
kill-buffer and M-x hexl-find-file each time.
How about adding M-x hexl-revert-buffer?
[hexl-revert-buffer.diff (text/x-patch, inline)]
=== modified file 'lisp/hexl.el'
--- lisp/hexl.el 2010-10-10 23:12:30 +0000
+++ lisp/hexl.el 2010-10-20 05:46:47 +0000
@@ -189,6 +189,7 @@
(define-key map "\C-x\C-p" 'undefined)
(define-key map "\C-x\C-s" 'hexl-save-buffer)
(define-key map "\C-x\C-t" 'undefined)
+ (define-key map "\C-xg" 'hexl-revert-buffer)
map))
;; Variable declarations for suppressing warnings from the byte-compiler.
@@ -464,6 +465,16 @@
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))
+(defun hexl-revert-buffer ()
+ "Revert the buffer previously opened with `hexl-find-file'."
+ (interactive)
+ (if (eq major-mode 'hexl-mode)
+ (let ((coding-system-for-read 'no-conversion))
+ (revert-buffer nil nil t)
+ (setq major-mode 'fundamental-mode)
+ (hexl-mode))
+ (call-interactively #'revert-buffer)))
+
(defun hexl-mode-exit (&optional arg)
"Exit Hexl mode, returning to previous mode.
With arg, don't unhexlify buffer."
[Message part 5 (text/plain, inline)]
Regards,
--
Daiki Ueno
[Message part 6 (message/rfc822, inline)]
Done as r102027.
Regards,
--
Daiki Ueno
This bug report was last modified 14 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.