GNU bug report logs - #26161
25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil

Previous Next

Package: emacs;

Reported by: "George D. Plymale" <georgedp <at> orbitalimpact.com>

Date: Sat, 18 Mar 2017 21:22:01 UTC

Severity: minor

Tags: confirmed, fixed, patch

Found in version 25.1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "George D. Plymale" <georgedp <at> orbitalimpact.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; `eshell-exit-success-p' determines that Lisp commands are
 successful if they return non-nil
Date: Sat, 18 Mar 2017 15:12:41 -0400
[Message part 1 (text/plain, inline)]
Hi,

I believe that it is sub-optimal behavior for `eshell-exit-success-p' to
determine that Lisp commands are successful by checking whether or not
they return a non-nil value. A demonstration of why this behavior can be
considered problematic is found in a command like this: `$ cd .. && pwd'

Such a command will not execute its second part (which is `pwd') because
`eshell/cd' returns a nil value whether it's successful or not. This
behavior is a bit confusing for someone who expects common shell
operators such as `&&' to "just work."

A better solution would be to check whether the last command threw an
actual error.

Thanks,

- George Plymale II

In GNU Emacs 25.1.1 (x86_64-apple-darwin16.1.0, NS appkit-1504.60 Version 10.12.1 (Build 16B2657))
of 2016-11-14 built on [REDACTED]
Repository revision: f0eb70d8935be90f7c03e187c12d9b60e7214cc6
Windowing system distributor 'Apple', version 10.3.1504
Configured using:
'configure --with-ns'



[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 34 days ago.

Previous Next


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