From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.bugs Subject: bug#4953: 23.1.50; Dired does not deal well with xz-compressed files Date: Sat, 21 Nov 2009 22:56:47 +0100 Message-ID: <877htjczj4.fsf@turtle.gmx.de> References: <87k4xop5tt.fsf@turtle.gmx.de> <87d43fkkxf.fsf@turtle.gmx.de> Reply-To: Sven Joachim , 4953@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258841422 31402 80.91.229.12 (21 Nov 2009 22:10:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 22:10:22 +0000 (UTC) To: 4953@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 21 23:10:11 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBy9j-0003SB-GL for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 23:10:11 +0100 Original-Received: from localhost ([127.0.0.1]:39142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBy7W-0003IG-Iq for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 17:07:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBy7G-0003DZ-4C for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 17:07:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBy7A-0003BP-Dc for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 17:07:37 -0500 Original-Received: from [199.232.76.173] (port=45570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBy7A-0003BK-90 for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 17:07:32 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37105) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBy79-0002WH-5G for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 17:07:31 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nALM7Lml003499; Sat, 21 Nov 2009 14:07:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nALM5536002797; Sat, 21 Nov 2009 14:05:05 -0800 Resent-Date: Sat, 21 Nov 2009 14:05:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Sven Joachim Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 21 Nov 2009 22:05:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4953 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4953-submit@emacsbugs.donarmstrong.com id=B4953.12588406171920 (code B ref 4953); Sat, 21 Nov 2009 22:05:04 +0000 Original-Received: (at 4953) by emacsbugs.donarmstrong.com; 21 Nov 2009 21:56:57 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id nALLuts3001917 for <4953@emacsbugs.donarmstrong.com>; Sat, 21 Nov 2009 13:56:56 -0800 Original-Received: (qmail invoked by alias); 21 Nov 2009 21:56:49 -0000 Original-Received: from p54864874.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.72.116] by mail.gmx.net (mp019) with SMTP; 21 Nov 2009 22:56:49 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX18e2uBvNMUeRu6cj+HlWjDRRDVvvYvmqoDLQ8FCd3 9VCjHKCyWLdLTG Original-Received: by turtle.gmx.de (Postfix, from userid 1000) id 6E909354B6; Sat, 21 Nov 2009 22:56:48 +0100 (CET) In-Reply-To: <87d43fkkxf.fsf@turtle.gmx.de> (Sven Joachim's message of "Thu, 19 Nov 2009 08:55:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 21 Nov 2009 17:07:37 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32803 tags 4953 + patch thanks On 2009-11-19 08:55 +0100, Sven Joachim wrote: > On 2009-11-19 08:42 +0100, Glenn Morris wrote: > >> Sven Joachim wrote: >> >>> - dired-do-shell-command does not offer anything for file.tar.xz >> >> I don't know what this means. M-x dired-do-shell-command for >> foo.tar.gz doesn't seem to do anything special. > > You need to load dired-x first (Info "(dired-x) Shell Command Guessing"). Here is a patch that adds support for xz-compressed files to dired-guess-shell-alist-default, emulating the case of bzip2-compressed files: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 4da19f6..dce8685 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -1017,6 +1017,16 @@ dired." ;; Optional decompression. "bunzip2") + ;; xz'ed archives + (list "\\.t\\(ar\\.\\)?xz$" + "unxz -c * | tar xvf -" + ;; Extract files into a separate subdirectory + '(concat "mkdir " (file-name-sans-extension file) + "; unxz -c * | tar -C " + (file-name-sans-extension file) " -xvf -") + ;; Optional decompression. + "unxz") + '("\\.shar\\.Z$" "zcat * | unshar") '("\\.shar\\.g?z$" "gunzip -qc * | unshar") @@ -1098,6 +1108,7 @@ dired." (list "\\.g?z$" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) (list "\\.dz$" "dictunzip") (list "\\.bz2$" "bunzip2") + (list "\\.xz$" "unxz") (list "\\.Z$" "uncompress" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") --8<---------------cut here---------------end--------------->8--- Suggested Changelog entry: 2009-11-21 Sven Joachim * dired-x.el (dired-guess-shell-alist-default): Support xz format. Cheers, Sven