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 #16 received at 25458 <at> debbugs.gnu.org (full text, mbox):

From: Francesco Potortì <pot <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25458 <at> debbugs.gnu.org
Subject: Re: bug#25458: 25.1; tar mode does not handle compressed archives
 without specific extensions
Date: Fri, 13 May 2022 16:36:20 +0200
I am not saying that it's worth the trouble, and anyway I would not have the time to help working on it, sorry.  However, here is some food for thought.

>> 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 I think the question is -- do we want to support this?  I'm not
>quite sure -- it would be pretty unusual for a mode to do something like
>this, and it's not clear what the semantics should be.  That is, if
>we're saving the tar buffer afterwards, should it be compressed or not?
>Either option would surprise somebody.

Not really.  If I read a compressed file, Emacs uncompresses it when loading it to a buffer, then you can edit it and save it.  Compression and decompression are transparent.  I use this feature quite often, and so I am led to expect it of compressed archives too.  If it was compressed to begin with, it should be saved compressed too.

>And finally -- is this a thing that actually exists in the wild?  I
>don't think I've ever seen a compressed tar file that didn't have a name
>that indicated how it was compressed.

Hm, maybe it's only me, but I routinely produce tar files without any compression suffix, as tar automatically does the right thing with compressed archives (it has done for many years now).  I think that adding compression suffixes to tar files is (should be?) a thing of the past.

>So due to both the unclear semantics and that I doubt the utility, I'm
>inclined to close this as a "wontfix".  Anybody got any opinions?

I definitely think that it would be useful, and the semantics is clear at least to me (I may miss things, obviously).  However, that needs someone implementing it who thinks the same...

-- fp




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.