> for Emacs, I cannot be certain how it sets the working 
> directory of the
> command that it executes. However, I suspect the NT/Emacs version of
> start-process uses the standard Windows api function, chdir, 
> to change the
> working directory. This function accepts paths with forward 
> or back slashes
> or both. So the style of the path should not be an issue here.

This makes sense, but in my case, the default directory is not getting used
properly - it is set correctly - from doing a describe-variable:

default-directory's value is 
"c:/src/depot/JavaBrowser/Current/build"
Local in buffer *compilation*; global value is 
nil

but it does not get applied - when I do a C-c C-v C-b I get:
   cd c:/src/depot/JavaBrowser/Current/build 
   make   
   OPUS MAKE: Nothing to make. Stop.
   Compilation exited abnormally with code 1 at Fri Jul 13 11:50:28

(the makefile is in this directory, but the make prog doesn't find it).

The compile command works fine, since the directory is directly passed to
the javac program.

> To confirm this, I have done some experimentation on setting
> default-directory on Win2K, using Unix style paths and 
> Windows style paths.
> As I suspected, it makes no difference which you use. They 
> both work. You
> can easily verify this yourself. Here is how.
> 
> 1. Use Files->JDE New->Class to create an empty class named Test.java
>    in your  d:\ directory.
> 
> 
>    public class Test {
>       public Test (){
>     
>     }
>   
>     }// Test
> 
> 
> 2. Compile this file. Note that it compiles without error.
> 
> Here is the output in the compilation buffer.
> 
> cd d:/
> javac Test.java
> 
> Compilation finished at Thu Jul 12 01:58:42
> 
> 
> 3. Now with the Test.java buffer selected, execute
> 
>    M-x eval-expression (setq default-directory "c:/winnt")
> 
>    This changes the default directory of the source buffer.
> 
> 4. Now compile again.
> 
> 
> cd c:/winnt
> javac  -g Test.java
> error: cannot read: Test.java
> 1 error
> 
> Compilation exited abnormally with code 1 at Thu Jul 12 02:17:01
> 
> The compile fails because the working directory of the 
> compile process has
> changed.

This example works for me too...  if I set my make working directory to C:/
and put the makefile there, it finds it:

  cd c:/
  make   
  ================================================================
  The following features are currently active:
  ... etc...


But anything beyond just c:/ fails... but presumably that would work for
you, if your JDE makefile build works....

Also, as I mentioned , these commands don't work from the emacs shell when
not using bash either, unless the slashes are reversed or the directory name
is in quotes.  I think the emacs shell does something tricky with working
directories too, doesn't it?

Any idea where else I should look to solve this?  I guess one answer would
just be to hack up my jde path normalization functions to replace slashes
with  backslashes, but this is a lousy solution...

Any ideas would be much appreciated!

Thanks,

Iain.




Reply via email to