bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24620: 26.0.50; In dired: 'dired-do-compress-to' fails when filename


From: npostavs
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

José L. Doménech <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]