Hi,
arc-mode doesn't set coding-system-for-read when opening files inside a zip
file. So when opening pictures I often get format error due to ascii
conversion, as my default coding-system is raw-text.
The patch below sets coding-system-for-read while reading the file, and
buffer-file-coding-system on the resulting buffer. Works for me.
-- René
xemacs-packages/os-utils/ChangeLog addition:
2006-08-17 René Kyllingstad <listmailxemacs(a)kyllingstad.com>
* arc-mode.el (archive-extract): set coding-system-for-read
and buffer-file-coding-system
XEmacs Packages source patch:
Diff command: cvs -q diff -u
Files affected: xemacs-packages/os-utils/arc-mode.el
Index: xemacs-packages/os-utils/arc-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/os-utils/arc-mode.el,v
retrieving revision 1.5
diff -u -u -r1.5 arc-mode.el
--- xemacs-packages/os-utils/arc-mode.el 2005/01/30 14:40:06 1.5
+++ xemacs-packages/os-utils/arc-mode.el 2006/08/17 13:16:45
@@ -815,6 +815,7 @@
(descr (archive-get-descr))
(ename (aref descr 0))
(iname (aref descr 1))
+ (coding-system-for-read (find-file-coding-system-for-read-from-filename iname))
(archive-buffer (current-buffer))
(arcdir default-directory)
(archive (buffer-file-name))
@@ -835,6 +836,7 @@
(expand-file-name (concat arcname ":" iname)))
(setq buffer-file-truename
(abbreviate-file-name buffer-file-name))
+ (setq buffer-file-coding-system coding-system-for-read)
;; Set the default-directory to the dir of the superior buffer.
(setq default-directory arcdir)
(make-local-variable 'archive-superior-buffer)