GNU bug report logs -
#26161
25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil
Previous Next
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 #18 received at 26161 <at> debbugs.gnu.org (full text, mbox):
"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.