GNU bug report logs - #25458
25.1; tar mode does not handle compressed archives without specific extensions

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Mon, 16 Jan 2017 15:21:01 UTC

Severity: wishlist

Found in version 25.1

Full log


Message #19 received at 25458 <at> debbugs.gnu.org (full text, mbox):

From: Francesco Potortì <pot <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25458 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#25458: 25.1;
 tar mode does not handle compressed archives without specific
 extensions
Date: Fri, 13 May 2022 16:45:42 +0200
>> Cc: 25458 <at> debbugs.gnu.org
>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Date: Fri, 13 May 2022 16:12:24 +0200
>> 
>> Francesco Potortì <pot <at> gnu.org> writes:
>> 
>> > By looking at the comments on top of tar-mode.el, I get that it does not
>> > rely on tar to get the archive listing, but reads the archive itself, so
>> > correcting this problem does not appear straightforward to me...
>> 
>> (I'm going through old bug reports that unfortunately weren't resolved
>> at the time.)
>> 
>> If Emacs had code to automatically recognise compressed data, I guess
>> tar-mode could decompress the buffer before it started working on it.
>> (Does Emacs have that?  I guess we could add stuff to
>> `magic-fallback-mode-alist' or something in that region...)
>
>But decompressing means, for most compression types, running an
>external program on the file.  Or does OP suggest that we link Emacs
>against libbz2, liblz4, liblzma, etc. to have these decompression
>methods available in core?

If Emacs parses the tar file itself, without relying on tar, in principle it should read compressed tar files too.  It could do that by using external compression tools, or more efficiently by natively handling compression.

However, I think that in general this requires uncompressing the whole tar file in memory or on disk, which is against one of the main purposes stated in the inital comments of tar-mode.el.




This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.