Subject: RE: how to not echo shell command in NT v19.34.1

From: Eric Hanchrow <[email-masked]>
Date: Wed, 11 Sep 1996 12:12:33 -0700

For some reason, my fix (below) for suppressing echoes in the shell
buffer only works the *second* time I do M-x shell in an Emacs session.

>-----Original Message-----
>From:	Eric Hanchrow 
>Sent:	Tuesday, September 10, 1996 02:21 PM
>To:	'Ronald Courtright'; NT GNU Emacs Users; [email-masked]
>Subject:	RE: how to not echo shell command in NT v19.34.1
>
>I've found that putting
>
>      ;; To prevent all command lines from getting echoed.
>      (add-hook 'shell-mode-hook '(lambda () (setq explicit-cmd.exe-args
>'("/q"))))
>
>in my .emacs keeps my commands from echoing.
>
>Also, if you want to get rid of those control-Ms:
>
>      ;; To prevent unsightly control-Ms from showing up in the shell buffer.
>      (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
>
>
>-----Original Message-----
>From:	Ronald Courtright [SMTP:[email-masked]]
>Sent:	Tuesday, September 10, 1996 12:48 PM
>To:	[email-masked]
>Subject:	how to not echo shell command in NT v19.34.1
>
>Greetings,
>
>I did not have this problem in v19.31, but in shell mode, the cmd is echoed
>on a newline.  So, if I enter 
>$ ls
>ls
>foo bar
>Same problem if I use an NT native cmd like 'dir.'
>
>I tried 'setq comint-process-noecho t' but to no avail.
>
>I am open to suggestions.  Oh, yes, I am using NT v4b2.
>
>Regards,
>
>Ron

---

From: Peter Breton <[email-masked]>
Date: Wed, 11 Sep 1996 17:36:04 -0400

Eric> For some reason, my fix (below) for suppressing echoes in the
 Eric> shell buffer only works the *second* time I do M-x shell in an
 Eric> Emacs session.

Quite likely your setq is taking effect _after_ explicit-cmd.exe-args
has been consulted! 

This works well for me:

(defvar cmd-init-file (concat my-home "\\cmdinit.cmd"))
(defvar explicit-cmd-args
      (list "/q" (concat "/k" cmd-init-file)))

;; NT-Shell
(defun nt-shell ()
  "Runs the Windows NT native shell"
  (interactive)
  (let ((explicit-shell-file-name "cmd"))
    (shell) 
    (make-local-variable 'explicit-shell-file-name)
    (setq explicit-shell-file-name "cmd")))

It also lets you run multiple shells, if desired; just define similar
bash and tcsh (and whatever) functions.

			Peter

 >> -----Original Message----- From: Eric Hanchrow Sent: Tuesday,
 >> September 10, 1996 02:21 PM To: 'Ronald Courtright'; NT GNU Emacs
 >> Users; [email-masked] Subject: RE: how to not
 >> echo shell command in NT v19.34.1
 >> 
 >> I've found that putting
 >> 
 >> ;; To prevent all command lines from getting echoed.  (add-hook
 >> 'shell-mode-hook '(lambda () (setq explicit-cmd.exe-args
 >> '("/q"))))
 >>