unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26161: 25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil
@ 2017-03-18 19:12 George D. Plymale
  2017-03-31  3:52 ` npostavs
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: George D. Plymale @ 2017-03-18 19:12 UTC (permalink / raw)
  To: 26161

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

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'




[-- Attachment #2: Type: text/html, Size: 1734 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-04-21  3:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-18 19:12 bug#26161: 25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil George D. Plymale
2017-03-31  3:52 ` npostavs
2017-04-01 23:46 ` George D. Plymale
2017-04-02  0:06   ` npostavs
2017-04-11 19:48 ` George D. Plymale
2017-04-13  1:18   ` npostavs
2017-04-20 19:47     ` George Plymale II
2017-04-21  3:10       ` npostavs

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).