From: npostavs@users.sourceforge.net
To: "José L. Doménech" <domenechjosel@gmail.com>
Cc: 24620@debbugs.gnu.org, Michael Albinus <michael.albinus@gmx.de>
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 [thread overview]
Message-ID: <87bmy2r4y2.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87insbdmmk.wl-domenechjosel@gmail.com> ("José L. Doménech"'s message of "Sat, 29 Oct 2016 20:40:51 +0200")
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
tags 24620 fixed
close 24620 26
quit
José L. Doménech <domenechjosel@gmail.com> 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é L. Doménech <domenechjosel@gmail.com>
>
> Fix bug#24620: In dired enable compress to/from files whose filenames contains space characters.
Okay, now the summary line is a bit too long. I shortened the summary
and pushed your patch to master.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1645 bytes --]
From 27443df092bfb4ada559f8fc024e01f174a5bcb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Dom=C3=A9nech?= <domenechjosel@gmail.com>
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
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
>
> Thanks for your patiente.
Thanks for your contribution.
P.S. your mails seem to be getting duplicated (or even triplicated for the
last one).
next prev parent reply other threads:[~2016-10-30 1:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 7:06 bug#24620: 26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space characters José L. Doménech
2016-10-27 14:03 ` José L. Doménech
2016-10-27 17:19 ` Eli Zaretskii
2016-10-27 17:34 ` Michael Albinus
2016-10-27 18:39 ` José L. Doménech
2016-10-27 18:51 ` Noam Postavsky
2016-10-27 19:29 ` José L. Doménech
2016-10-27 23:14 ` npostavs
2016-10-28 7:06 ` José L. Doménech
2016-10-29 2:06 ` npostavs
2016-10-29 9:17 ` José L. Doménech
2016-10-29 12:06 ` npostavs
2016-10-29 18:40 ` José L. Doménech
2016-10-29 19:42 ` José L. Doménech
2016-10-30 1:39 ` npostavs [this message]
2016-10-30 8:33 ` José L. Doménech
2016-10-29 18:41 ` José L. Doménech
2016-10-28 9:22 ` bug#24620: Forward: " José L. Doménech
2016-10-27 19:31 ` José L. Doménech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmy2r4y2.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=24620@debbugs.gnu.org \
--cc=domenechjosel@gmail.com \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).