Subject: bug#25458: 25.1; tar mode does not handle compressed archives without specific extensions

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 13 May 2022 16:12:24 +0200

Francesco Potortì <[email-masked]> 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 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.

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.

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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no