Subject: Re: > yet another fix for double echo in shell

From: Dave Strauss <[email-masked]>
Date: Tue, 01 Oct 1996 10:51:32 -0400

At 06:03 PM 9/30/96 CDT, George D. Hadden wrote:
 +----
 | >>>>> "DB" == David Biesack <[email-masked]> writes:
 | 
 | >> Date: Mon, 30 Sep 96 11:23:51 CDT
 | >> From: [email-masked] (George D. Hadden)
 | >> 
 | >> i'm having a problem with processes echoing input that doesn't seem to
 | >> be fixed by setting comint-process-echoes to t.
 | 
 | DB> The correct fix is to start cmd.exe with the /q option via 
 | 
 | DB>   (setq explicit-cmd.exe-args "/q")
 | 
 | DB> where explicit-shell-file-name is "cmd.exe". If you use a different
 | DB> explicit-shell-file-name, set the explicit-*-args variable accordingly.
 | 
 | DB> That is, cmd.exe is echoing the commands, not comint
 | 
 | david, thanks for your response.  unfortunately, i tried this and it
 | doesn't work for me.  i think that there's a bug in the elisp
 | code, and i'm looking for verification of this and comments on the solution
 | proposed in my previous message.
 | 
 | again, here are the conditions that make this bug appear:
 | 1) windows 95 (although this shouldn't matter)

Actually, this DOES matter because Win95 uses command.com, not cmd.exe,
as the command shell.  The arguments to command.com are different than
for cmd.exe.  I have this working on my Win95 machine at home, but
I've forgotten how it's set up :-(.  For Windows NT, I have
   (setq explicit-cmd.exe-args '("/q") )
in my .emacs file.  I seem to recall that for Win95 I have
   (setq explicit-command.com-args nil)
but I'll have to check that.

 | [ ... ]
 | 
 +----

-------------------------------------------------------------------------------
"The best ideas do not | Dave Strauss@work   [email-masked]  
 necessarily come from |                     http://www.systemsoft.com
 the loudest voices"   |                     Phone: 508-647-2873
                       |                     Fax:   508-651-8188
                       |
                       | Dave Strauss@play   [email-masked]
                       |                     http://www.gis.net/~dstrauss
-------------------------------------------------------------------------------

---

From: [email-masked] (George D. Hadden)
Date: Tue, 1 Oct 96 11:32:02 CDT

ok, one more time!!!

my note and david's response:

    >>>>> "DB" == David Biesack <[email-masked]> writes:

    >> Date: Mon, 30 Sep 96 11:23:51 CDT
    >> From: [email-masked] (George D. Hadden)
    >> 
    >> i'm having a problem with processes echoing input that doesn't seem to
    >> be fixed by setting comint-process-echoes to t.

    DB> The correct fix is to start cmd.exe with the /q option via 

    DB>   (setq explicit-cmd.exe-args "/q")

    DB> where explicit-shell-file-name is "cmd.exe". If you use a different
    DB> explicit-shell-file-name, set the explicit-*-args variable accordingly.

    DB> That is, cmd.exe is echoing the commands, not comint

    david, thanks for your response.  unfortunately, i tried this and it
    doesn't work for me.  i think that there's a bug in the elisp
    code, and i'm looking for verification of this and comments on the solution
    proposed in my previous message.

    again, here are the conditions that make this bug appear:
    1) windows 95 (although this shouldn't matter)
    2) comint-input-autoexpand --> 'history
    3) comint-process-echoes --> t

    incidentally, since they're buffer-local symbols, performing the 

    (setq comint-input-autexpand 'history) 

    and the 

    (setq comint-process-echoes t) 

    in the *scratch* buffer will not do what you want.  you must instead
    execute the command "eval-expression", and then type the expressions to it
    while in the *shell* buffer.  (there's probably a better way, but i don't
    know it :-)

    so, is there anyone out there for whom this also fails, or am i
    halucinating? 

another david's response (refering to the w95 comment):

i'm not sure why i'm having so much trouble making myself clear here, but
i'll give it one more shot :-)

david (both of you), you would be right, if a particular path through the
elisp of comint.el were taken.  however the settings of the variables above
(incidentally shell.el sets comint-input-autoexpand to 'history) cause it
to take a different path.  this path contains a bug (i believe) that i
describe in a previous message.  i'm just trying to get a second opinion on
whether it's really a bug, at which point (i might not wait that long given
how this thread is progressing :-), i'll submit it to fsf (?).

thanks, everyone, for your patience, and i hope that some of this has been
edifying thus far.

-geo