On Thu, 27 Oct 2016 20:51:15 +0200, Noam Postavsky wrote: > > On Thu, Oct 27, 2016 at 2:39 PM, Jos¨¦ L. Dom¨¦nech > wrote: > > I am getting a "replace-regexp-in-string: Invalid use of ¡®\¡¯ in replacement text" > > error using 'shell-quote-argument' on this case. > > > > It seems that 'shell-quoted-argument' is adding double '\', that is, > > '\\', in front of the spaces instead of surrounding the argument with quotes. > > > > And 'replace-match' which is called by 'replace-regexp-in-string' for the parameter > > substitution ("%i", "%o") in the function 'dired-do-compress-to' doesn't like it. > > Does passing non-nil for the LITERAL parameter to replace-regexp-in-string help? > Yes indeed! So the patch becomes something like: