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

Previous Next

Package: emacs;

Reported by: Milan Zimmermann <milan.zimmermann <at> gmail.com>

Date: Tue, 29 Nov 2022 00:17:02 UTC

Severity: normal

Found in version 29.0.50

Done: Milan Zimmermann <milan.zimmermann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 59666 <at> debbugs.gnu.org, milan.zimmermann <at> gmail.com
Subject: bug#59666: 29.0.50; Eshell: comparisons such as {> 3 2} do not work in Eshell context
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).




This bug report was last modified 2 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.