On Sat, Feb 04, 2023 at 12:02:35AM +0100, Bruno Barbier wrote: > Eric Abrahamsen writes: > > > chad writes: > > > >> On Fri, Feb 3, 2023 at 4:23 PM Eric Abrahamsen > >> wrote: > >> > >>> > >>> Kind of sounds like I should be using `start-process-shell-command' > >>> again! As I understand it, this is its main selling point. > >>> > >> > >> Have you by chance looked at shell-quote-argument or > >> split-string-shell-command? It's been a while since I had to deal with > >> this, but I recall the former being helpful then, and it looks like it may > >> be meant to handle your situation. > > > > But, to be clear, my problem doesn't seem to be escaping/unescaping > > shell-specific characters, as far as I can see that isn't causing the > > trouble. It's passing in the search query as a single argument, when it > > contains spaces. It works fine when it's a single string with no spaces > > in it. > > But, if you go the `start-process-shell-command' way, shell escaping is > going to be *your* problem (for any possible meaning of shell). > > And, in this case, you should really consider using > `shell-quote-argument'. It /does/ help with whitespaces: (shell-quote-argument "foo bar baz") => "foo\\ bar\\ baz" Cheers -- t