21.5
Followups to XEmacs Patches, please. Reply-To set.
Stephen J. Turnbull writes:
Thanks for the report. I'm pretty sure I know what the problem
is
(yup, same basic problem, two symptoms), and I'll try to get to a
quick fix later this week.
This is a fix for the easier hexl-mode problem. Maybe it's actually
good enough. ;-) I haven't looked at the archive-mode issue yet.
That's probably harder (since often you'll want to decompress the
tar.gz and similar, I think, so it's harder to fix than just appending
"-literally" and updating a docstring :-).
Samuel Bronson writes:
> I just tried to hexl-find-file a zip archive to figure out why
> archive-mode wasn't able to parse it correctly, and I was rather
> surprised to this tiny amount of text in my buffer:
[elided]
> If you look closely, you'll notice that this is a hexdump of an
> `archive-mode' buffer -- not exactly very useful...
Untested patch. I'll get to testing later, but this is
straightforward enough to be "obviously correct" (famous last words).
If you could try this, I'd appreciate it.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/text-modes/ChangeLog,v
retrieving revision 1.179
diff -u -r1.179 ChangeLog
--- ChangeLog 19 Oct 2010 15:29:13 -0000 1.179
+++ ChangeLog 19 Oct 2010 16:10:33 -0000
@@ -0,0 +1,4 @@
+2010-10-20 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * hexl.el (hexl-find-file): Defeat auto-mode and auto-coding magic.
+
Index: hexl.el
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/text-modes/hexl.el,v
retrieving revision 1.7
diff -u -r1.7 hexl.el
--- hexl.el 10 May 2005 18:20:06 -0000 1.7
+++ hexl.el 19 Oct 2010 16:10:33 -0000
@@ -296,11 +296,10 @@
;;;###autoload
(defun hexl-find-file (filename)
"Edit file FILENAME in hexl-mode.
-Switch to a buffer visiting file FILENAME, creating one if none exists."
+Switch to a buffer visiting file FILENAME, creating one if none exists.
+See `find-file-literally' for limitations regarding existing buffers."
(interactive "fFilename: ")
- (if (featurep 'file-coding)
- (find-file filename 'binary)
- (find-file filename))
+ (find-file-literally filename)
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches