Subject: shell-mode problems

From: "Jacob Colman (JNC Consulting Group)" <[email-masked]>
Date: Tue, 22 Oct 1996 23:56:45 -0400

I am having problems with shell-mode.  I have implemented some of the
suggestions given me by other users but I am not having much luck.  Using
the prebuilt distribution, shell-mode works for the most part provided I set
"comint-process-echoes t".  I have recently downloaded source code and done
my own build and now I am getting ^M at the end of every line.  I can
correct it by spcifying a comint hook to stip ^M and that works well.
Process shells, however, (such as that used by diff, grep, compile, etc.)
still have the ^M.  This becomes a problem whrn using ediff since it cannot
parse the diffs buffer.

The prebuilt distribution was apparantly built using NT4.0 (at least so says
emacs-version). Mine was built using NT351, and MSVC 4.2.  Can this be the
difference?

In any case, for NT351, what is the appropriate way to configure shell-mode
such that both interactive and non-interactive shells work properly?
---
Jake Colman                     email: [email-masked]
JNC Consulting Group Inc.       Phone: (914) 368-2765
42 Olympia Lane                 FAX  : (914) 368-2765
Monsey, NY  10952

---

From: "Michael Welsh Duggan" <[email-masked]>
Date: 23 Oct 1996 08:56:21 -0400

> emacs-version). Mine was built using NT351, and MSVC 4.2.  Can this be the

Yes, at least to the 4.2 part.  This can be fixed by changing the
following line in sys_pipe() in nt.c.

  rc = _pipe (phandles, 0, _O_NOINHERIT);

to

  rc = _pipe (phandles, 0, _O_TEXT | _O_NOINHERIT);

I believe that in the next version, emacs will not rely on the default
text-mode CR stripping.

-- 
Michael Duggan
([email-masked])