From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66532: 29.1; dired-guess-default command for tar.zst file fails Date: Wed, 25 Oct 2023 16:33:17 +0300 Message-ID: <831qdikesi.fsf@gnu.org> References: <87bkd2315h.fsf@posteo.de> <83zg0lsouv.fsf@gnu.org> <877cnp57v9.fsf@posteo.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31846"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66532-done@debbugs.gnu.org To: Michael Eliachevitch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 15:35:01 2023 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 1qve2G-00080P-Sh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 15:35:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qve20-0000fH-29; Wed, 25 Oct 2023 09:34:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qve1q-0000df-N5 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 09:34:35 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qve1o-0008SM-D3 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 09:34:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qve2I-0002O0-6q for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 09:35:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2023 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 66532 X-GNU-PR-Package: emacs Mail-Followup-To: 66532@debbugs.gnu.org, eliz@gnu.org, m.eliachevitch@posteo.de Original-Received: via spool by 66532-done@debbugs.gnu.org id=D66532.16982408629100 (code D ref 66532); Wed, 25 Oct 2023 13:35:01 +0000 Original-Received: (at 66532-done) by debbugs.gnu.org; 25 Oct 2023 13:34:22 +0000 Original-Received: from localhost ([127.0.0.1]:57746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qve1d-0002Mi-QT for submit@debbugs.gnu.org; Wed, 25 Oct 2023 09:34:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qve1a-0002MU-NK for 66532-done@debbugs.gnu.org; Wed, 25 Oct 2023 09:34:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qve0z-0008Ob-W1; Wed, 25 Oct 2023 09:33:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hkt4nPFDfLp3gNHWnrFGnxiZGwafpLXGlXGX+BgkY5I=; b=Ao2s0K4oUgi4 SAFhma61knTuUW6xtUW6t5KLV5F9JgMMt8n+MwgXH0MrdfqeS9pwqpuaE9L/WlxObceHj8hOAqjGR Wqk2iHd62eyBFS+HZWnl3dj/AsTF3ynUEBslqsJE/savCENUbx4ErAxVBRa9Mf9HPit84vJEFADCc PA6poseDdONmlsoZ66ELU/THaqGqBn8E+5JmOn991vDSfOAFV2zicL8GtcPvQMONOKlfhO3dL1o2w GIjvRyeIsTBO3lJGh+JJGr2Imhe0FJHuGkFzx/9xkUGkr6RMmoSa4gxAX00BBiN/xULaKBWiJmmdZ uaw2QUVPriwzWK8L2JYxsw==; In-Reply-To: <877cnp57v9.fsf@posteo.de> (message from Michael Eliachevitch on Sat, 14 Oct 2023 18:41:52 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273176 Archived-At: > From: Michael Eliachevitch > Cc: 66532@debbugs.gnu.org > Date: Sat, 14 Oct 2023 18:41:52 +0000 > > > > > Does the patch below fix this? > > > > diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el > > index fc3f6f4..458acad 100644 > > --- a/lisp/dired-aux.el > > +++ b/lisp/dired-aux.el > > @@ -1172,7 +1172,7 @@ dired-guess-shell-alist-default > > "unxz") > > > > ;; zstandard archives > > - `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c %i | tar -xf -") > > + `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c * | tar -xf -") > > `(,(rx ".zst" eos) "unzstd --rm") > > > > '("\\.shar\\.Z\\'" "zcat * | unshar") > > > Yes, this patch works for me for a single tar.zst archive. > > However, when I mark multiple tar.zst archives and then run the > suggested shell command (with *) on all of them, only the first archive > gets extracted.. I just opened the Emacs manual dired section and found > the `?' is a placeholder for which the command gets executed separately > for each marked file. So with > > unzstd -c ? | tar -xf - > > each marked archive gets successfully extracted. Here also formatted as a patch; > > diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el > index 2ff620065a5..e0bcae6b005 100644 > --- a/lisp/dired-aux.el > +++ b/lisp/dired-aux.el > @@ -1176,7 +1176,7 @@ dired-guess-shell-alist-default > "unxz") > > ;; zstandard archives > - `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c %i | tar -xf -") > + `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c ? | tar -xf -") > `(,(rx ".zst" eos) "unzstd --rm") > > '("\\.shar\\.Z\\'" "zcat * | unshar") > > I am just wondering that I didn't find the questionmark placeholder in > any of the other suggested commands for compressed tar files, not sure > if they work fur multiple marked files, I didn't test that. Thanks, I installed your variant on the emacs-29 branch, and I'm therefore closing this bug.