From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24620: 26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space characters Date: Sat, 29 Oct 2016 21:39:01 -0400 Message-ID: <87bmy2r4y2.fsf@users.sourceforge.net> References: <87ponfi8ay.wl-j_l_domenech@yahoo.com> <878tt9zy64.wl-domenechjosel@gmail.com> <87funhd7ba.fsf@gmx.de> <87bmy5bpqz.wl-domenechjosel@gmail.com> <87insdpp45.wl-domenechjosel@gmail.com> <87wpgtqt92.fsf@users.sourceforge.net> <87a8dp0x6v.wl-domenechjosel@gmail.com> <87r36zrjr4.fsf@users.sourceforge.net> <8737jfjyzm.wl-domenechjosel@gmail.com> <87k2crqrz1.fsf@users.sourceforge.net> <87insbdmmk.wl-domenechjosel@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1477791580 10183 195.159.176.226 (30 Oct 2016 01:39:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2016 01:39:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24620@debbugs.gnu.org, Michael Albinus To: =?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 30 02:39:36 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0f5Z-0007Td-Ix for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Oct 2016 02:39:09 +0100 Original-Received: from localhost ([::1]:56654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0f5c-0005KI-9d for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2016 21:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0f5V-0005Id-8U for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 21:39:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0f5S-0007xV-4T for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 21:39:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49737) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0f5S-0007xH-0f for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 21:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c0f5R-0001ne-PY for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 21:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2016 01:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24620 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24620-submit@debbugs.gnu.org id=B24620.14777915096877 (code B ref 24620); Sun, 30 Oct 2016 01:39:01 +0000 Original-Received: (at 24620) by debbugs.gnu.org; 30 Oct 2016 01:38:29 +0000 Original-Received: from localhost ([127.0.0.1]:36903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0f4v-0001mm-5D for submit@debbugs.gnu.org; Sat, 29 Oct 2016 21:38:29 -0400 Original-Received: from mail-it0-f52.google.com ([209.85.214.52]:38392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0f4s-0001mT-Ut; Sat, 29 Oct 2016 21:38:27 -0400 Original-Received: by mail-it0-f52.google.com with SMTP id q124so44104006itd.1; Sat, 29 Oct 2016 18:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=K+/Q2xVKK7e0oFcXSAzvIz9zgXJDYeRdu4ADtpz49Ao=; b=iRb6aEIHIfSnKWEe3vdqSpFUmCRIKTJUqW9MCxBmAq84fhIW993WRjfAq2l5PI89yM mPZrqT0FWw8d8oW1YVANPMSXFvWRG3V137QxhDnrjVqKgCeLyU4KsTYf3JWexpBnyx6y R4Wgg2/zGRaqqC0z4YQ/wQDI7EgDGBUsIytma4afP7HoLSmi7c18kpji4kfUhaOrKNH6 nnGAUdzc6hxCCbXFXGqKR/AAIIOoHK3WAWHJBvGKbG7nssmc/CR9UapjavWXBpxkr369 YQ6TJAbVASYb8tHo7p1fdJUDnTCglkCRUjYim/TyKdHZnCGN3EKUZd/TsHcEid2/LKVW nFZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=K+/Q2xVKK7e0oFcXSAzvIz9zgXJDYeRdu4ADtpz49Ao=; b=Qy8CDNdxW7tYrZ+ZIUYNA17HBxnl98lvKxcKNrm0MO4zTV6XvjgSwxDqxbBujgd8Ij 8K4iaU/gwMA4PDiQ39J1dRAod3CtwMbbpDX8mWn4WW7aveuXMM1HfusVHuy8RQcVe25i /XwhTHUzsvXaYwlvksDcBXR7a2rGELBawRPsx1L4viF0W3KemU/IgQMXNbRZo3jZ/fnc WCxmjvkutbE0g0ByBIxxlZ6YJfApQ+1cubhNdLBCGjgucuveLN+iruMrud8A1facPeh/ LcXWlPnAgCYbFRVwHZxbe/0kUklGBHVKSPYB4e6hwNscJpQeMpXUUdks9VNhEgqxHHVW dMvQ== X-Gm-Message-State: ABUngvf4IcCrt2Qc5pP759+wxbybQ4/nKM/44pZhkw8U/ZCDKIBa8F62dUxUjzqclpi0HA== X-Received: by 10.36.73.134 with SMTP id e6mr3916341itd.109.1477791501362; Sat, 29 Oct 2016 18:38:21 -0700 (PDT) Original-Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id e21sm7890820iof.23.2016.10.29.18.38.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Oct 2016 18:38:20 -0700 (PDT) In-Reply-To: <87insbdmmk.wl-domenechjosel@gmail.com> ("=?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?="'s message of "Sat, 29 Oct 2016 20:40:51 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125135 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tags 24620 fixed close 24620 26 quit Jos=C3=A9 L. Dom=C3=A9nech writes: > Sorry for the delay. I don't worry about delays which are approximately 0 days long :) > Perhaps this is more convenient: > > 2016-09-29 Jos=C3=A9 L. Dom=C3=A9nech > > Fix bug#24620: In dired enable compress to/from files whose filenames con= tains space characters. Okay, now the summary line is a bit too long. I shortened the summary and pushed your patch to master. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Quote-file-names-in-dired-compression-commands.patch Content-Description: patch >From 27443df092bfb4ada559f8fc024e01f174a5bcb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Dom=C3=A9nech?= Date: Sat, 29 Oct 2016 21:18:31 -0400 Subject: [PATCH] Quote file names in dired compression commands * lisp/dired-aux.el (dired-do-compress-to): Change the string used as shell command for compression by quoting the filenames used for input and output (Bug #24620). --- lisp/dired-aux.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d25352e..972b6b1 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1012,11 +1012,13 @@ dired-do-compress-to (t (when (zerop (dired-shell-command - (replace-regexp-in-string - "%o" out-file - (replace-regexp-in-string - "%i" (mapconcat #'file-name-nondirectory in-files " ") - (cdr rule))))) + (format-spec (cdr rule) + `((?\o . ,(shell-quote-argument out-file)) + (?\i . ,(mapconcat + (lambda (file-desc) + (shell-quote-argument (file-name-nondirectory + file-desc))) + in-files " ")))))) (message "Compressed %d file(s) to %s" (length in-files) (file-name-nondirectory out-file))))))) -- 2.9.3 --=-=-= Content-Type: text/plain > > Thanks for your patiente. Thanks for your contribution. P.S. your mails seem to be getting duplicated (or even triplicated for the last one). --=-=-=--