From owner-ntemacs-users@june  Fri Nov  8 14:36:14 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" " 8" "November" "1996" "16:50:45" "-0500" "David Biesack" "sasdjb@unx.sas.com" nil "27" "better cd tracking for ntemacs" "^From:" nil nil "11" nil nil nil nil]
	nil)
Status: RO
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id OAA02708 for <voelker@june.cs.washington.edu>; Fri, 8 Nov 1996 14:36:13 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id OAA18488 for <voelker@joker.cs.washington.edu>; Fri, 8 Nov 1996 14:36:12 -0800
Received: from lamb.sas.com (lamb.sas.com [192.35.83.8]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id NAA28637 for <ntemacs-users@cs.washington.edu>; Fri, 8 Nov 1996 13:50:56 -0800
Received: from mozart by lamb.sas.com (5.65c/SAS/Gateway/01-23-95) 	id AA22989; Fri, 8 Nov 1996 16:50:54 -0500
Received: from lambda.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) 	id AA04266; Fri, 8 Nov 1996 16:50:45 -0500
Received: by lambda.unx.sas.com (5.65c/SAS/Generic 9.01/3-26-93) 	id AA18245; Fri, 8 Nov 1996 16:50:45 -0500
Message-Id: <199611082150.AA18245@lambda.unx.sas.com>
From: David Biesack <sasdjb@unx.sas.com>
To: ntemacs-users@cs.washington.edu
Subject: better cd tracking for ntemacs
Date: Fri, 8 Nov 1996 16:50:45 -0500


The directory tracking for NT shells does not work well when there are
drive changes, etc.  Is anyone working on this?

I'd trying to implement a small hack which tracks better, and also
allows forward slashes (I'm an old Unix bigot) and defaults to CMD.EXE's
/D option on CHDIR, which allows you to specify the drive and the
directory in one command, i.e.

  cd d:/gnu/emacs-19.34

I have this partially working, and using gnudoit from my cd.exe, I tell
Emacs to do a (cd "current dir") for the shell buffer, but my cd.exe
program does not change the current directory for the parent process,
i.e. the CMD shell from which it is called.

I have some DOS based programs which do this (acd233.zip, cdd11.zip)
without a problem in an NT shell (both in an Emacs subprocess shell or
in an NT CMD.EXE shell window).  I'm compiling my cd.c with MS VC++ 4.1
as a Console app.  This apparently puts wraps the app in it's own
environment so that it can't change the parent's environment.

If someone knows the trick to compile this program so that it can change
the shells default drive/directory, I can make my cd.exe and
the Emacs Lisp hooks available.

thanks.

