Subject: bug#59666: 29.0.50; Eshell: comparisons such as {> 3 2} do not work in Eshell context

From: Jim Porter <[email-masked]>
Date: Thu, 1 Dec 2022 17:53:57 -0800

On 12/1/2022 5:38 PM, Milan Zimmermann wrote:
> Would it be reasonable to suggest removing existing functionality as 
> follows:
[snip]
> The currently allowed
> 
> 3. {command-call}
> 4. (function-call)
> 
> would represent syntax error.
> 
> (3. is outright wrong as it brings silent invalid results)

Both 3 and 4 are valid forms, although I think (lisp) and $(lisp) are 
equivalent. In particular, 3 is important for being able to check the 
exit status of external programs:

   ~ $ if {sh -c 'exit 0'} {echo yes} {echo no}
   yes
   ~ $ if {sh -c 'exit 1'} {echo yes} {echo no}
   no
   ~ $ if ${sh -c 'exit 0'} {echo yes} {echo no}
   no  ;; Wrong!
   ~ $ if ${sh -c 'exit 1'} {echo yes} {echo no}
   no

I think there's an argument that {lisp-function} should work the same as 
${lisp-function}, but only for "regular" Lisp functions (i.e. excluding 
eshell/FOO ones; since those are designed to imitate external commands, 
they have different semantics).