From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: peter Newsgroups: gmane.emacs.bugs Subject: Viewing compressed files in tar mode Date: Sun, 13 Dec 2009 03:00:17 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1260723484 7559 80.91.229.12 (13 Dec 2009 16:58:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2009 16:58:04 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 13 17:57:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJrlZ-00082r-Ld for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Dec 2009 17:57:53 +0100 Original-Received: from localhost ([127.0.0.1]:35402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJrlZ-0008Tb-OM for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Dec 2009 11:57:53 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!p8g2000yqb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 103 Original-NNTP-Posting-Host: 212.143.139.191 Original-X-Trace: posting.google.com 1260702017 13555 127.0.0.1 (13 Dec 2009 11:00:17 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 13 Dec 2009 11:00:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p8g2000yqb.googlegroups.com; posting-host=212.143.139.191; posting-account=Q0_2HwoAAAC1wfO9Zvhq377DLcEZJQL2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.bug:61991 X-Mailman-Approved-At: Sun, 13 Dec 2009 11:57:38 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33555 Archived-At: 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 "=1F\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 "=1F\x8b"] ["\\.g?z\\(~\\| \ \.~[0-9]+~\\)?\\'" "compressing" "gzip" ("-c" "-q") "uncompressing" "gzip" ("-c" "-q" "-d") t t "=1F\x8b"] ["\\.dz\\'" nil nil nil "uncompressing" "gzip" ("-c" "-q" "-d") nil t "=1F\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=D2=81H 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 =E2=80=93 although it does exist in the file system! (Adding .zip or .ZIP is an automatism of unzip when it fails to find "file name.")