GNU bug report logs - #24620
26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space characters

Previous Next

Package: emacs;

Reported by: José L. Doménech <j_l_domenech <at> yahoo.com>

Date: Wed, 5 Oct 2016 07:07:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 26.0.50

Fixed in version 26

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: José L. Doménech <domenechjosel <at> gmail.com>
Cc: 24620 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#24620: 26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space	characters
Date: Thu, 27 Oct 2016 19:14:49 -0400
José L. Doménech <domenechjosel <at> gmail.com> writes:
>
> So the patch becomes something like:
>
>                    (dired-shell-command
>                     (replace-regexp-in-string
> -                    "%o" out-file
> +                    "%o" (shell-quote-argument out-file)
>                      (replace-regexp-in-string
> -                     "%i" (mapconcat #'file-name-nondirectory in-files " ")
> -                     (cdr rule)))))
> +                     "%i" (mapconcat (lambda (file-desc)
> +                                       (shell-quote-argument
> +                                        (file-name-nondirectory file-desc)))
> +                                     in-files " ")
> +                     (cdr rule) nil t) nil t)))

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.




This bug report was last modified 8 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.