Subject: Re: bug#57752: 28.1.91; emacsclient-mail.desktop doesn't work for me

From: Gregory Heytings <[email-masked]>
Date: Fri, 16 Sep 2022 16:42:37 +0000

>> And why is the above easier / better than
>> 
>> emacsclient --eval '(progn (fun1 arg1 arg2) (fun2 arg3))'
>
> Because, with this, you have to correctly format the arguments with 
> appropriate quoting into a lisp program, rather than just passing them 
> straight in.  If the arguments are input from something else, this is 
> harder than it appears.  Bad quoting is a common source of bugs (things 
> like SQL injection, for example).
>

If that's the intended use case, IMO instead of adding two --function and 
--function-arg arguments it would be much clearer to add a --setq 
parameter:

emacsclient --setq arg1 ... --setq arg2 ... --setq arg3 ... --eval '(progn (fun1 arg1 arg2) (fun2 arg3))'