Using ACL with ILISP on MS Windows

"Bill Clementson" <[email protected]> Tue, 9 Apr 2002 22:10:41 -0600
Newsgroups gmane.lisp.ilisp.general
Message-ID <[email protected]>
I am trying to setup ILISP with ACL on MS Windows. I previously 
posted a message to this newsgroup and the suggestion was that I should
use build.exe/buildi.exe. Since these weren't included in the ACL trial 
edition, I wasn't able to try out that suggestion. I am now a beta tester 
for ACL 6.2 so I have access to build.exe/buildi.exe. I have encountered
a problem with using ilisp with acl and wondered whether anyone could
suggest any options. BTW, I have already received permission from 
Franz to post the question to this group (since I'm doing my test with
a beta version of acl). They believe that the issue that I am encountering 
would be the same in acl 6.1 and is not related to the acl 6.2 beta.

Here's the problem:
I have tried out ilisp with acl and everything seems to work ok with the
exception that I get extraneous "^M"s after every line in the listener. For
example:
--------------------------------------------------------------
Starting allegro ...
ILISP V5.11.1  Use M-x ilisp-bug for problems and suggestions.
WARNING: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^M
WARNING: Allegro CL will expire in 55 days.^M
WARNING: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^M
Allegro CL Enterprise Edition^M
6.2.beta [Windows] (Mar 27, 2002 18:00)^M
Copyright (C) 1985-2002, Franz Inc., Berkeley, CA, USA.  All Rights
Reserved.^M
^M
This development copy of Allegro CL is licensed to:^M
   6.2.beta Tester^M
^M
;; Optimization settings: safety 1, space 1, speed 1, debug 2.^M
;; For a complete description of all compiler switches given the current
optimization settings evaluate^M
;; (EXPLAIN-COMPILER-SETTINGS).^M
CL-USER(1): ^M
CL-USER(2):
--------------------------------------------------------------

I have set up ilisp/emacs to start ACL with the following command:
"C:/Program Files/ACL/buildi.exe" -I "C:/Program
Files/ACL/alisp.dxl" -compat-crlf

I thought that the -compat-crlf switch would remove the extra "^M"s but it
doesn't. I asked Franz about this and their reply was:

"As for '-compat-crlf', this is a fairly subtle compatibility flag
mainly meant for Lisp code that uses both #\return and #\linefeed
characters within Lisp strings instead of the single standard
#\newline character.  I don't think it would have much affect on the
problem of seeing ^M's in the emacs buffer."

So, I took out the -compat-crlf switch but still have the same problem.
The person I dealt with didn't have specific experience with ILISP
but was able to offer the following suggestion:

"I'm not an emacs/subprocess expert, but I know that this kind of
behavior happens when starting up shell processes or telnet/rlogin
sessions where the pseudo-tty has stty settings which cause the ^M's
(ascii carriage return characters) to be generated.  There are various
ways to work around this.  For example, our fi:rlogin function
literally sends a "stty -echo nl" command which helps filter ^M's from
the buffer interacting with the subprocess.  On Windows, one doesn't
use "stty", but it may be possible to force the first Lisp call to be
one which executes a run-shell-command to alter the pseudo-tty's mode
the same way the "stty -echo nl" command is used by fi:rlogin.  I
don't have enough direct experience in this area to be able to suggest
anything more specific, but this might give you a direction in which
to look."

I'm not sure if this is the best option for me to explore. I could do 
something ugly like put after advice on the return-ilisp function to 
erase the extra "^M"s in the buffer, but I'm sure there must be some 
better way to deal with the issue. Surely, someone else is using acl
with ILISP under MS Windows and has found out how to fix this
problem?

Does anyone have any idea what I can do to remove the "^M"s in
the buffer; because, other than the "^M"s, everything else in acl 
seems to work fine under ilisp. I get the "^M"s after every form
I enter, so it's really irritating.

If I can get this working properly, I'll add the acl ilisp setup
instructions to my CL Cookbook page at:
http://cl-cookbook.sourceforge.net/windows.html
I already have instructions there for setting up acl with eli, clisp with
ilisp, lispworks with ilisp, and Corman with eshell (all under MS Windows
with Emacs). 

Thanks for any suggestions and help.

--
Bill Clementson