From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Francesco =?UTF-8?Q?Potort=C3=AC?= Newsgroups: gmane.emacs.bugs Subject: bug#25458: 25.1; tar mode does not handle compressed archives without specific extensions Date: Sat, 14 May 2022 00:25:36 +0200 Organization: The GNU project Message-ID: <87r14xm5nj.fsf@tucano.isti.cnr.it> References: <87o801serb.fsf@gnus.org> <83ilq9ms6n.fsf@gnu.org> <871qwx2zv8.fsf@gnus.org> <838rr5mnej.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25458@debbugs.gnu.org, Lars Ingebrigtsen To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 14 00:26:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npdjn-0008k5-3R for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 May 2022 00:26:19 +0200 Original-Received: from localhost ([::1]:55270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npdjl-000289-Ln for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 May 2022 18:26:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npdjX-00027g-LQ for bug-gnu-emacs@gnu.org; Fri, 13 May 2022 18:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npdjW-0005kB-PC for bug-gnu-emacs@gnu.org; Fri, 13 May 2022 18:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1npdjW-000686-JY for bug-gnu-emacs@gnu.org; Fri, 13 May 2022 18:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 May 2022 22:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 25458-submit@debbugs.gnu.org id=B25458.165248074023527 (code B ref 25458); Fri, 13 May 2022 22:26:02 +0000 Original-Received: (at 25458) by debbugs.gnu.org; 13 May 2022 22:25:40 +0000 Original-Received: from localhost ([127.0.0.1]:45251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npdj9-00067P-VX for submit@debbugs.gnu.org; Fri, 13 May 2022 18:25:40 -0400 Original-Received: from plesklin7.if1.ehiweb.it ([79.98.45.16]:33673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npdj8-00067G-3y for 25458@debbugs.gnu.org; Fri, 13 May 2022 18:25:38 -0400 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by plesklin7.if1.ehiweb.it (Postfix) with ESMTPSA id 130B71094D5; Sat, 14 May 2022 00:25:37 +0200 (CEST) In-Reply-To: <838rr5mnej.fsf@gnu.org> (eliz@gnu.org) X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-PPP-Message-ID: <20220513222537.17003.48388@plesklin7.if1.ehiweb.it> X-PPP-Vhost: potorti.it X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232200 Archived-At: >> From: Lars Ingebrigtsen >> Cc: pot@gnu.org, 25458@debbugs.gnu.org >> Date: Fri, 13 May 2022 17:53:15 +0200 >> >> Eli Zaretskii writes: >> >> > 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? >> >> No, it would work just like when you read a tar.gz file -- we use >> external decompressors for that, too, even if we then parse the >> resulting tar file ourselves. > >Then I guess I don't understand what is the problem we are asked to >fix here. Francesco, can you explain? If I read foo.tar into Emacs, where foo.tar was created with $ tar -Jcf foo.tar any.file.name then Emacs does not recognise it as a tar file. Instead, it should look at it, understand that it is a compressed tar file, uncompress and parse it. If asked to save it after modification, it should compress it before saving, using the same compression method that was used in the first place. Compression would be transparent to Emacs if it relied on Tar for parsing the tar file, because Tar manages compressed files transparently. But since Emacs parses the tar file itself, it should behave as Tar does, that is, uncompress the file if it was compressed in the first place, and recompress when saving it after editing.