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


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: "George D. Plymale" <georgedp <at> orbitalimpact.com>
Cc: 26161 <at> debbugs.gnu.org
Subject: bug#26161: 25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil
Date: Sat, 01 Apr 2017 20:06:19 -0400
"George D. Plymale" <georgedp <at> orbitalimpact.com> writes:

> it'd probably be better off if `eshell-exit-success-p' just
> checked`eshell-last-command-status' and Eshell makes sure that erring commands
> always set that to non-zero (which I think is already covered by
> `eshell-trap-errors').

That makes sense to me.

>> AFAICT, when you cd to a non-existent directory it doesn't throw an
>> error, but I don't think that should be considered success.
>
> Yeah, `eshell/cd' actually is able to bypass something like
> `eshell-trap-errors' because it uses `cd' under the hood through this
> function invocation: `(eshell-printn result)' where `result' is `(cd
> newdir)'. See, `eshell-printn' just captures the result of its given
> object and prints that out. In some cases, that object is an error (like
> when you cd into a non-existent directory), but you can't really tell
> that because `eshell-printn' doesn't care about errors; it just prints
> out the object it's given. Functions that do this sort of thing may also
> exist aside from `eshell/cd', so I'm unsure what can be done about that.

It looks like `eshell-exec-lisp' catches the error, so probably
`eshell-last-command-status' could be set there.  Patches welcome.




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.