* Viewing compressed files in tar mode
@ 2009-12-13 11:00 peter
0 siblings, 0 replies; only message in thread
From: peter @ 2009-12-13 11:00 UTC (permalink / raw
To: bug-gnu-emacs
I have a tar file a.tar, which contains two files, b.gz and c.jpg.
The jpeg file is opened correctly, but the gz file is opened in binary
mode, whereas it should be uncompressed and shown in text mode.
I have run this with emacs -Q with the same results.
Below is a copy of an email from Peter Dyballa:
I have this customisation for GNU Emacs 22:
'(jka-compr-compression-info-list (quote (["\\.Z\\(~\\|\\.~
[0-9]+~\
\)?\\'" "compressing" "compress" ("-c") "uncompressing" "gzip" ("-c"
"-
q" "-d") nil t "\x1f\x9d"] ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
"bzip2ing"
"bzip2" nil "bunzip2ing" "bzip2" ("-d") nil t "BZh"] ["\\.tbz\\(\\|2\
\)
\\'" "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2" ("-d") nil nil
"BZh"]
["\\.\\(?:tgz\\|svgz\\)\\'" "compressing" "gzip" ("-c" "-q")
"uncompressing" "gzip" ("-c" "-q" "-d") t nil "\x1f\x8b"] ["\\.g?z\\(~\\|
\
\.~[0-9]+~\\)?\\'" "compressing" "gzip" ("-c" "-q") "uncompressing"
"gzip" ("-c" "-q" "-d") t t "\x1f\x8b"] ["\\.dz\\'" nil nil nil
"uncompressing" "gzip" ("-c" "-q" "-d") nil t "\x1f\x8b"])))
/Users/pete/.emacs-Abrichtung-AquaMacs.el: '(auto-compression-mode t
nil (jka-compr))
and I had this for its variant Aquamacs Emacs (Mac OS X only):
'(auto-compression-mode t nil (jka-compr))
>
> I suspect this is a tar-mode.el bug. Should I report it on the bugs
> list?
Yes, please do! I tried it this morning by creating an archive
comprised of other archives and I then tested a newly compiled
version
of GNU Emacs 23.1.90 from CVS. When I visited the included TAR type
archives they were opened in fundamental mode (instead of tar-mode)
and unreadable. It worked well with ZIP files: their contents was
shown. But when I tried to view/visit an archive member it failed:
unzip: cannot find or open /Volumes/Halde/_neu/
Beispiel.tar.bz2!./
random.zip, /Volumes/Halde/_neu/Beispiel.tar.bz2!./random.zip.zip
or /
Volumes/Halde/_neu/Beispiel.tar.bz2!./random.zip.ZIP.
(/Volumes/Halde/_neu/Beispiel.tar.bz2 is my archive of archives,
random.zip is the member mentioned.)
When I tried to switch to tar-mode I received:
byte-code: ^_\300\213^H^H\301\246\322\201H has size -362276419
-
corrupted
This echos the first ten bytes of the archive file. Before
*Messages*
buffer recorded:
File mode specification error: (error "^_\213\^H^H\346ҁH has
size
-362276419 - corrupted")
Similiar reports were output when I tried to visit other TAR files
in
this archive.
Compressed "text-like" files in the archive were not decompressed.
With a GZipped file I received:
Error during redisplay: (wrong-type-argument number-or-marker-
p nil)
File mode specification error: (wrong-type-argument wholenump
nil)
With ncurses-5.4-20040711-patch.sh.bz2 I received:
Setting up indent for shell type sh
setting up indent stuff
Indentation variables are now local.
Indentation setup for shell type sh
but I saw only the compressed "text," easily recognisable by the
file's header "BZh"...
With GNU Emacs 22.3 I get a "File mode specification error"...
The common failure is that tar-mode is not activated in the TAR file
inside the TAR file and that to unzip is passed a wrong file name,
one
that is concatenated of the archive file's path name, a "!" and the
ZIP file's relative path name – although it does exist in the file
system! (Adding .zip or .ZIP is an automatism of unzip when it fails
to find "file name.")
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-13 11:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-13 11:00 Viewing compressed files in tar mode peter
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.