From: npostavs@users.sourceforge.net
To: "George D. Plymale" <georgedp@orbitalimpact.com>
Cc: 26161@debbugs.gnu.org
Subject: bug#26161: 25.1; `eshell-exit-success-p' determines that Lisp commands are successful if they return non-nil
Date: Thu, 30 Mar 2017 23:52:39 -0400 [thread overview]
Message-ID: <87shlu14s8.fsf@users.sourceforge.net> (raw)
In-Reply-To: <7E4E5778-FFBF-4298-9DEF-0A60539999D5@orbitalimpact.com> (George D. Plymale's message of "Sat, 18 Mar 2017 15:12:41 -0400")
tags 26161 confirmed
severity 26161 minor
quit
"George D. Plymale" <georgedp@orbitalimpact.com> writes:
> 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'
So maybe `eshell/cd' should be changed to return t when it succeeds?
> 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.
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.
next prev parent reply other threads:[~2017-03-31 3:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shlu14s8.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=26161@debbugs.gnu.org \
--cc=georgedp@orbitalimpact.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.