From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?= Newsgroups: gmane.emacs.bugs Subject: bug#24620: 26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space characters Date: Fri, 28 Oct 2016 09:06:32 +0200 Message-ID: <87a8dp0x6v.wl-domenechjosel@gmail.com> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1477666013 21981 195.159.176.226 (28 Oct 2016 14:46:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2016 14:46:53 +0000 (UTC) User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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 Fri Oct 28 16:46:46 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 1c08QL-0002XG-DF for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Oct 2016 16:46:25 +0200 Original-Received: from localhost ([::1]:49587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c08QN-0003St-Vr for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Oct 2016 10:46:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c01Fs-0000k0-07 for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2016 03:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c01Fn-0007Vc-0M for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2016 03:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c01Fm-0007VP-Sy for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2016 03:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c01Fm-0005Ln-Ev for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2016 03:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Oct 2016 07:07:02 +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: Original-Received: via spool by 24620-submit@debbugs.gnu.org id=B24620.147763840120538 (code B ref 24620); Fri, 28 Oct 2016 07:07:02 +0000 Original-Received: (at 24620) by debbugs.gnu.org; 28 Oct 2016 07:06:41 +0000 Original-Received: from localhost ([127.0.0.1]:33090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c01FR-0005LC-J8 for submit@debbugs.gnu.org; Fri, 28 Oct 2016 03:06:41 -0400 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:35954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c01FQ-0005Kz-2O for 24620@debbugs.gnu.org; Fri, 28 Oct 2016 03:06:40 -0400 Original-Received: by mail-wm0-f48.google.com with SMTP id b80so77984206wme.1 for <24620@debbugs.gnu.org>; Fri, 28 Oct 2016 00:06:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:message-id:from:to:cc:newsgroups:subject :in-reply-to:references:user-agent:mime-version; bh=iguQ0OuQ7J0C8qOuEmPLouB0CNzR11WpznMfmdHAZeM=; b=jawsVc16sZUXpybpiNd1d3yBWDu9Zu3gewy5+LwiC39vAM0pyEPcoEWgObud1nsYxy u9/t1gbCPjpS2Nd7GrzKA1DpXCXyF/IYYvkL1TaW/anbofNhy3di7KFlH7lShsACsRsl 0L4QyElZ1Lk5Jji7BtGBCKJdJoRRKhGG1I4zerzUoeMD5m2kJlbjxDc27vMZ5aaS+gGF g8hGVezd2CXqLuf8/DwJGdnC0P6ki29shomxeZlZhcNlbuG34xZ+Lr8z1msuprpyxdwy NU9XvQLWIvZVxGk8MhZEHWY12EgDPgu4TdzDrl0wDGkQN6LRNHYSyogw6w7GUcW/WS+g +Y0Q== X-Gm-Message-State: ABUngvcJ+HvKXTW4c6KGk8Na92NHLM7QnYEFHepLHhXkdHOUJG9NbGNRsomClcf13OeBxw== X-Received: by 10.28.209.142 with SMTP id i136mr2234361wmg.1.1477638394081; Fri, 28 Oct 2016 00:06:34 -0700 (PDT) Original-Received: from jose-ThinkPad-Edge-E330.google.com (1.red-83-35-232.dynamicip.rima-tde.net. [83.35.232.1]) by smtp.gmail.com with ESMTPSA id 130sm7316991wmf.0.2016.10.28.00.06.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2016 00:06:33 -0700 (PDT) Original-Newsgroups: gmane.emacs.bugs In-Reply-To: <87wpgtqt92.fsf@users.sourceforge.net> 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-Mailman-Approved-At: Fri, 28 Oct 2016 10:46:17 -0400 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:125094 Archived-At: On Fri, 28 Oct 2016 01:14:49 +0200, npostavs@users.sourceforge.net wrote: > > > That looks pretty good. I think it would be even nicer to use the > `format-spec' function instead of calling `replace-regexp-in-string' > twice. > > Here are the changes: --- dired-aux.orig.el 2016-10-27 15:50:50.428634418 +0200 +++ dired-aux.el 2016-10-28 09:01:08.413024427 +0200 @@ -1012,11 +1012,15 @@ (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) + (list (cons ?o (shell-quote-argument out-file)) + (cons ?i + (mapconcat + (lambda (filename) + (shell-quote-argument + (file-name-nondirectory filename))) + in-files " ")))))) (message "Compressed %d file(s) to %s" (length in-files) (file-name-nondirectory out-file))))))) Diff finished. Fri Oct 28 09:01:25 2016