Subject: bug#1388: 23.0.60; Emacs shell problem with echo "1+1" | bc

From: Stefan Monnier <[email-masked]>
Date: Fri, 21 Nov 2008 23:03:45 -0500

>> echo "1+1" | bc
>> and then the return key. Instead of the expected answer 2, eshell
>> displays:
>> bc 1.06
>> Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
> I think this is because isatty(0) returns 1 on the right-hand side of
> an eshell pipe, so bc thinks it is running interactively.  Does anyone
> know if that is fixable?

Yes, an appropriate binding of process-connection-type at the right
place and the right time should do the trick.

        Stefan