help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viewing files in tar mode


From: Peter Dyballa
Subject: Re: Viewing files in tar mode
Date: Fri, 11 Dec 2009 12:25:36 +0100


Am 11.12.2009 um 09:54 schrieb Peter Gordon:

You suggested that I customise auto-compression-mode, but that variable
deals with gz files. In any case, could you give me the syntax for
setting auto-compression-mode to jka-compr?

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 "\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 "\x8b"] ["\\.g?z\\(~\\|\ \.~[0-9]+~\\)?\\'" "compressing" "gzip" ("-c" "-q") "uncompressing" "gzip" ("-c" "-q" "-d") t t "\x8b"] ["\\.dz\\'" nil nil nil "uncompressing" "gzip" ("-c" "-q" "-d") nil t "\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.")

--
Greetings

  Pete

We are usually convinced more easily by reasons we have found ourselves than by those which have occurred to others.
                                – Blaise Pascal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]