Subject: bug#65030: 30.0.50; Check keyword args of make-process

From: Robert Pluim <[email-masked]>
Date: Tue, 08 Aug 2023 15:52:58 +0200

>>>>> On Tue, 08 Aug 2023 19:07:32 +0530, Visuwesh <[email-masked]> said:

    Visuwesh> [Tuesday August 08, 2023] Robert Pluim wrote:
    >>>>>>> On Sun, 6 Aug 2023 10:49:59 +0200, Mattias Engdegård <[email-masked]> said:
    >> 
    Mattias> 6 aug. 2023 kl. 06.58 skrev Eli Zaretskii <[email-masked]>:
    >> >> Any specific comments to the proposed patch?  Or do you think it is
    >> >> good to go?
    >> 
    Mattias> Good to go as far as I'm concerned. It will be genuinely useful, and I
    Mattias> see no serious problems with the implementation.
    Mattias> It can be extended but that would not prevent it from being committed
    Mattias> as-is. For example, something that detects omitted values in the
    Mattias> middle, not just the end, of the argument list. (The feasibility of
    Mattias> this depends on the likelihood of argument values being keywords
    Mattias> themselves.)
    >> 
    >> I donʼt think any of the `make-process' keywords accept keywords as
    >> values, but missing values tends to cause catastrophic failure, so I
    >> donʼt think itʼs that common a mistake.

    Visuwesh> Can you not pass keywords as non-nil values to :query and :stop?
    Visuwesh> Something like,

    Visuwesh>     (make-process :name NAME :command COMMAND :query :yes)

Only because :yes is non-nil. Also the docstring says:

    :noquery BOOL -- When exiting Emacs, query the user if BOOL is nil and
    the process is running.  If BOOL is not given, query before exiting.

which implies you can say

    (make-process :name "foo" :noquery :stop nil)

which is not true, since :noquery is checked with `plist-get'.

Whilst weʼre at it, this is inaccurate as well:

    :stop BOOL -- BOOL must be nil.  The `:stop' key is ignored otherwise
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

since the following will error:

    (make-process :name "foo" :command "ls" :stop t)

Robert
--