all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Viewing files in tar mode
@ 2009-12-10 14:51 peter
  2009-12-10 21:58 ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: peter @ 2009-12-10 14:51 UTC (permalink / raw)
  To: help-gnu-emacs

I have a tarfile (a.tar) containing a compressed  text file and a jpeg
file.
So, a.tar contains b.gz and c.jpeg

Emacs opens up the jpeg correctly - that is - I see the picture
The compressed file is opened as a binary file - emacs does not
uncompress it.

Is there a way of persuading emacs to open the gzipped file correctly?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Viewing files in tar mode
  2009-12-10 14:51 Viewing files in tar mode peter
@ 2009-12-10 21:58 ` Peter Dyballa
  2009-12-10 22:26   ` Lennart Borgman
  2009-12-11  8:54   ` Peter Gordon
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-12-10 21:58 UTC (permalink / raw)
  To: peter; +Cc: help-gnu-emacs


Am 10.12.2009 um 15:51 schrieb peter:

> Is there a way of persuading emacs to open the gzipped file correctly?


Try to customise auto-compression-mode – setting it to jka-compr  
should give you what you want. Maybe jka-compr-compression-info-list  
needs some customisation too.

--
Greetings

   Pete

When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
			– Rinzai, ninth century Zen master





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Viewing files in tar mode
  2009-12-10 21:58 ` Peter Dyballa
@ 2009-12-10 22:26   ` Lennart Borgman
  2009-12-10 23:17     ` Peter Dyballa
  2009-12-11  8:54   ` Peter Gordon
  1 sibling, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2009-12-10 22:26 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: peter, help-gnu-emacs

On Thu, Dec 10, 2009 at 10:58 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:
>
> Am 10.12.2009 um 15:51 schrieb peter:
>
>> Is there a way of persuading emacs to open the gzipped file correctly?
>
>
> Try to customise auto-compression-mode – setting it to jka-compr should give
> you what you want. Maybe jka-compr-compression-info-list needs some
> customisation too.


Should this be needed? Is this a bug, or?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Viewing files in tar mode
  2009-12-10 22:26   ` Lennart Borgman
@ 2009-12-10 23:17     ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-12-10 23:17 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: peter, help-gnu-emacs


Am 10.12.2009 um 23:26 schrieb Lennart Borgman:

> Should this be needed? Is this a bug, or?


Well, my first question should have been how it works uncustomised,  
i.e., with emacs -Q... (Older versions of GNU Emacs did need some  
customisation, which now, in GNU Emacs 23, might produce errors.)

--
Greetings

   Pete

Rain is saved up in cloud banks.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Viewing files in tar mode
  2009-12-10 21:58 ` Peter Dyballa
  2009-12-10 22:26   ` Lennart Borgman
@ 2009-12-11  8:54   ` Peter Gordon
  2009-12-11 11:25     ` Peter Dyballa
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Gordon @ 2009-12-11  8:54 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

On Thu, 2009-12-10 at 22:58 +0100, Peter Dyballa wrote:
> Am 10.12.2009 um 15:51 schrieb peter:
> 
> > Is there a way of persuading emacs to open the gzipped file correctly?
> 
> 
> Try to customise auto-compression-mode – setting it to jka-compr  
> should give you what you want. Maybe jka-compr-compression-info-list  
> needs some customisation too.
> 
But if I open a gz file from outside a tar file, it uncompresses the
file. 

I also tried running with emacs -Q, and it also failed to uncompress the
gz file contained in the tar file.

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 suspect this is a tar-mode.el bug. Should I report it on the bugs
list?

Peter



> --
> Greetings
> 
>    Pete
> 
> When you meet a master swordsman,
> show him your sword.
> When you meet a man who is not a poet,
> do not show him your poem.
> 			– Rinzai, ninth century Zen master
> 






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Viewing files in tar mode
  2009-12-11  8:54   ` Peter Gordon
@ 2009-12-11 11:25     ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-12-11 11:25 UTC (permalink / raw)
  To: Peter Gordon; +Cc: help-gnu-emacs


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 "\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.")

--
Greetings

   Pete

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-11 11:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 14:51 Viewing files in tar mode peter
2009-12-10 21:58 ` Peter Dyballa
2009-12-10 22:26   ` Lennart Borgman
2009-12-10 23:17     ` Peter Dyballa
2009-12-11  8:54   ` Peter Gordon
2009-12-11 11:25     ` Peter Dyballa

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.