From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Question about start-process and argument list Date: Sat, 4 Feb 2023 07:40:12 +0100 Message-ID: References: <87r0v7wgrp.fsf@ericabrahamsen.net> <63dd5f91.050a0220.1f3dc.df39@mx.google.com> <878rhel9zf.fsf@ericabrahamsen.net> <87zg9ujr64.fsf@ericabrahamsen.net> <63dd9297.df0a0220.2f942.ab1f@mx.google.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rrmlFHrMUflNLxSe" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12376"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eric Abrahamsen , chad , Jean Louis , emacs-devel@gnu.org To: Bruno Barbier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 04 07:41:19 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOCEf-0002zL-9X for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Feb 2023 07:41:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOCDw-0000Pe-Ng; Sat, 04 Feb 2023 01:40:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOCDp-0000PK-2D for emacs-devel@gnu.org; Sat, 04 Feb 2023 01:40:28 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOCDi-0007d2-Vz for emacs-devel@gnu.org; Sat, 04 Feb 2023 01:40:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gpsjBb1I3S0+ijzE40R8N8UIUOdSQMAhhhcofiqHC80=; b=WF3pViSbpUUnwi4Ah5gwveLPwR F2KV0FHKhs3WzKFH9KHziPXuDwJMZ1My16igTzW7SCAgnWkmiYXIvbTl6+MnH7xtxMBQtgB5it458 ohsMNjxyBUGue+TpJRcud2s1GgsOTQM39X+UlvYziDFLvEqXozvd0E+OXpMeqnmJBFsTBjSCfvpo+ MHOFH5n48m27yUQ10YqwSInS12e4B4qczCf4BeN1ioOzWaPi5MCSibazEVW7gI4MtGXsgMWTPQGBU h+hf5SdExAg3E8OwtvAAbCXJvp7BnEQSaMZ354puFcHb6GGFpZpMPdqgwRUMEQ6zUU/0W0NNiRi+E t6V8Zlsg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1pOCDc-0003eN-9N; Sat, 04 Feb 2023 07:40:12 +0100 Content-Disposition: inline In-Reply-To: <63dd9297.df0a0220.2f942.ab1f@mx.google.com> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302950 Archived-At: --rrmlFHrMUflNLxSe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 04, 2023 at 12:02:35AM +0100, Bruno Barbier wrote: > Eric Abrahamsen writes: >=20 > > 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. >=20 > But, if you go the `start-process-shell-command' way, shell escaping is > going to be *your* problem (for any possible meaning of shell). >=20 > And, in this case, you should really consider using > `shell-quote-argument'. It /does/ help with whitespaces: (shell-quote-argument "foo bar baz") =3D> "foo\\ bar\\ baz" Cheers --=20 t --rrmlFHrMUflNLxSe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY939xQAKCRAFyCz1etHa RjemAJ95AtymEQCnM+QdBIisUcO23zCPbQCeIwlwAv5j1sRabG/l6VhnxhW6EUU= =X9rl -----END PGP SIGNATURE----- --rrmlFHrMUflNLxSe--