unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Bruno Barbier <brubar.cs@gmail.com>
Cc: Jean Louis <bugs@gnu.support>,  emacs-devel@gnu.org
Subject: Re: Question about start-process and argument list
Date: Fri, 03 Feb 2023 13:23:00 -0800	[thread overview]
Message-ID: <878rhel9zf.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <63dd5f91.050a0220.1f3dc.df39@mx.google.com> (Bruno Barbier's message of "Fri, 03 Feb 2023 20:24:52 +0100")

Bruno Barbier <brubar.cs@gmail.com> writes:

> Jean Louis <bugs@gnu.support> writes:

Thanks to both of you for the responses.

>> * Eric Abrahamsen <eric@ericabrahamsen.net> [2023-02-03 09:37]:
>>> 
>>> 1. What does the program actually see, in this case? Is the first
>>>    example above, is it the equivalent of (on the command line) wrapping
>>>    the query in double quotes?
>>
>> It has same effect.
>
> Maybe I didn't understand the question, but I don't think it has the
> same effect nor that it should.

[...]

Right, and experience demonstrates that it doesn't have the same effect,
because one version works (with mairix) and the other doesn't.

>>> 2. Should I be using `start-process-shell-command' instead? The docs
>>>    mention that the main difference is that it will use shell features,
>>>    which aren't really relevant here, but maybe it's the right thing to
>>>    do, semantically.
>>
>> Rather no, as that becomes unsafe. Yes, it would invoke shell and
>> some environment and the program line. But for programing purposes is
>> unsafe. 
>
> Right, I would advise you, like Jean, to stay with `start-process'.

Thanks, I will do that.

> And, the search query should probably be only one argument (except if
> you accept to restrict you query syntax to something that's compatible
> with any possible way to quote and parse arguments on a command line on
> any possible OS, including sign like '-', '"', ')',  etc.).

Well, as noted above, it doesn't work when it's all one argument. At
least with one of the possible commands -- I can "fix it" for mairix in
particular, my main question is if I should be "fixing it" for all
search commands.

Not to be contrarian, but this:

> compatible with any possible way to quote and parse arguments on a
> command line on any possible OS

Kind of sounds like I should be using `start-process-shell-command'
again! As I understand it, this is its main selling point.



  reply	other threads:[~2023-02-03 21:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03  3:48 Question about start-process and argument list Eric Abrahamsen
2023-02-03 11:24 ` Jean Louis
2023-02-03 19:24   ` Bruno Barbier
2023-02-03 21:23     ` Eric Abrahamsen [this message]
2023-02-03 21:34       ` chad
2023-02-03 22:54         ` Eric Abrahamsen
2023-02-03 23:02           ` Bruno Barbier
2023-02-04  2:20             ` Eric Abrahamsen
2023-02-04  6:40             ` tomas
2023-02-04  7:22       ` Jean Louis
2023-02-04 18:25         ` Eric Abrahamsen
2023-02-04  7:18     ` Jean Louis
2023-02-04 18:13       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rhel9zf.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=brubar.cs@gmail.com \
    --cc=bugs@gnu.support \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).