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: Sat, 29 Oct 2016 11:17:17 +0200 Message-ID: <8737jfjyzm.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> <87a8dp0x6v.wl-domenechjosel@gmail.com> <87r36zrjr4.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 1477732712 8939 195.159.176.226 (29 Oct 2016 09:18:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2016 09:18:32 +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 , "=?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?=" To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 11:18:28 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 1c0PmE-0008DH-9w for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2016 11:18:10 +0200 Original-Received: from localhost ([::1]:53785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0PmG-0000xE-Qb for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2016 05:18:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0PmA-0000x8-6k for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 05:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0Pm7-00061F-1r for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 05:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0Pm6-00061B-UL for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 05:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c0Pm6-0005dn-Ly for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 05:18: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: Sat, 29 Oct 2016 09:18: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.147773264621631 (code B ref 24620); Sat, 29 Oct 2016 09:18:01 +0000 Original-Received: (at 24620) by debbugs.gnu.org; 29 Oct 2016 09:17:26 +0000 Original-Received: from localhost ([127.0.0.1]:35600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0PlW-0005cp-6e for submit@debbugs.gnu.org; Sat, 29 Oct 2016 05:17:26 -0400 Original-Received: from mail-wm0-f44.google.com ([74.125.82.44]:35521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0PlU-0005cb-Nx for 24620@debbugs.gnu.org; Sat, 29 Oct 2016 05:17:25 -0400 Original-Received: by mail-wm0-f44.google.com with SMTP id e69so147941306wmg.0 for <24620@debbugs.gnu.org>; Sat, 29 Oct 2016 02:17:24 -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:subject:in-reply-to :references:user-agent:mime-version; bh=zBaIQ6sNkNYPAFACfDjhWjWCnEFj7lqR/9eamX+UF6o=; b=E1MN0vbAdA5kAGovfo6VDSLwIH0IDkl9klB4l3iEqc/07UEqvtCvZYvDUQY7C+iVOw 35OaCIKtOhBvvtLV1uBL1ffG2M6tqlzXj+PWdZJ35kf4NAir4VlDCxbQ/dJiRWIWO53F ogJ0pr1iN6amvnZEGjXHUXnSTEhX/OTUrFKiZNOeJzoGWR+BN4D2KGrCOK8BKdDHxaC2 qnFPRyXtFeNa302TawdQqqTGg+s1BVkwXlu6PsbtT8LH2f2SVs+jFzD0xtHqYTmqwZoC /ou8mqwmp4qCrF/z9aTE8CatkFewX6fQiXlDLCIw8ARCA7GjwsMainbvBisimkTucBcC aPDA== X-Gm-Message-State: ABUngveH+RLlS+WVQxWzowta0py4r6ICt8LcjNjPITTW1lSEeTxv/wWWNeBq7UCiog2EYw== X-Received: by 10.194.153.228 with SMTP id vj4mr14908828wjb.204.1477732639140; Sat, 29 Oct 2016 02:17:19 -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 jq10sm18423320wjb.46.2016.10.29.02.17.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 02:17:18 -0700 (PDT) In-Reply-To: <87r36zrjr4.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-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:125102 Archived-At: On Sat, 29 Oct 2016 04:06:55 +0200, npostavs@users.sourceforge.net wrote: > > tags 24620 patch > quit > > > Looks good. Would you like to try writing a commit message too? (see > "Commit messages" in CONTRIBUTE). > Something like this? Fix Bug#24620 * 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 > Just a minor style suggestion: In cases like these, I like to use the > backquote syntax instead of explicit (list (cons ...)) because it saves > a bit of indentation. > I changed it: modified 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))))))) > Have you signed copyrigh assignment for Emacs? This patch is small > enough to merge anyway, but if you'll be writing more patches in the > future, consider filling out the form at > git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.program > to get the process started. Yes. I just started the process by sending a e-mail with the required data.