George, I don't know what time zone you live in, but you are one crazy
person! You're doing fantastic work for the Clojure community, and I
thank you very much for that!

The Emacs I was using was Clojure Box, so I disconnected slime (just
in case) and tried what you suggested. The results were better, but
still not success, so I downloaded and installed a fresh version of
W32 Emacs (i.e., Emacs only, no Clojure add-ons), then I started over.

Here's the result of refreshing the cdt directory (from the git-bash
shell):

-----
$ git pull origin windows
remote: Counting objects: 17, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 9 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (9/9), done.
>From git://github.com/GeorgeJahad/cdt
 * branch            windows    -> FETCH_HEAD
Merge made by recursive.
 ide/emacs/cdt.el            |    4 ++--
 src/com/georgejahad/cdt.clj |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

add-mini...@user-f38f1ebc55 /c/tech/cdt (master)
$ git checkout windows
error: pathspec 'windows' did not match any file(s) known to git.

add-mini...@user-f38f1ebc55 /c/tech/cdt (master)
$
-----

I don't know what went wrong with the last command, but some files
were changed in the directory.

>From a Windows cmd shell window, I got the target REPL working with
the following command:

----
java -
agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8021 -
client -cp \tech\clojure-contrib-1.2.0\target\clojure-
contrib-1.2.0.jar;\tech\clojure-1.2.0\clojure.jar clojure.main --repl
----

I did some research on how cmd works, and I found that the cd command
has a special syntax for changing the target disk drive--in other
words, it's as if, normally, the cd command is "blind" to the
existence of multiple hard disks. A Microsoft web page described the
following behavior:

----
C:\tech\cdt>cd \
C:\>
----

You could say that "\" acts like root on UNIX systems (!). This
explains why the backslash classpath separated by semicolons in the
above java command (probably) works. Onward.

OK, so now I have a fresh, untainted copy of Emacs. I put the
following in the .emacs file (which is otherwise empty):

----
(progn
  (setq cdt-dir "/tech/cdt")
  (setq cdt-source-path "/tech/clojure-1.2.0/src/jvm:/tech/
clojure-1.2.0/src/clj:/tech/clojure-contrib-1.2.0/src/main/clojure:")
  (load-file (format "%s/ide/emacs/cdt.el" cdt-dir)))
----

I open Emacs, execute M-x cdt, and get the following result:

----
Current directory is c:/Documents and Settings/add-minimum/Application
Data/
Clojure 1.2.0
user=> java.lang.ClassNotFoundException: com.sun.jdi.Bootstrap
(cdt.clj:28)
user=> java.lang.Exception: Unable to resolve symbol: set-source-path
in this context (NO_SOURCE_FILE:2)
user=> java.lang.Exception: Unable to resolve symbol: cdt-attach in
this context (NO_SOURCE_FILE:3)
user=>

Hooray! A REPL! I start reenacting your test-drive scenario and get
the following result:

----
user=> (set-bp clojure.set/difference)
java.lang.Exception: Unable to resolve symbol: set-bp in this context
(NO_SOURCE_FILE:4)
user=>
----

So that's the state of things. I'll be glad to work with you to get
this working on Windows. What so ironic is that I worked for Apple for
10 years, and the *only* reason I'm doing this on a PC is that the
Nuance/Dragon speech-recognition system for the PC is vastly superior
to its (just purchased by Nuance) MacOS X equivalent (sigh).

Best wishes,
Gregg

On Oct 10, 4:41 am, George Jahad <cloj...@blackbirdsystems.net> wrote:
> > git fetch
>
> Actually, instead of git fetch, use:
> git pull origin windows
>
> On Oct 10, 4:39 am, George Jahad <cloj...@blackbirdsystems.net> wrote:
>
> > I haven't gotten it working on Windows yet, (as I mention 
> > here:http://georgejahad.com/clojure/emacs-cdt.html)
>
> > I don't think it will be hard, but I've never run Clojure on Windows,
> > so I'm not sure of the issues involved.  I need someone like you to
> > help me figure them out.  I'm guessing the most important issue is the
> > one you are running into, the path/file separator differences.
>
> > I've just pushed my best guess at a fix for windows to the windows
> > branch here:http://github.com/GeorgeJahad/cdt
>
> > Can you try doing a:
> > git fetch
> > git checkout windows
>
> > from within your cdt repo, and see if that works any better for you?
>
> > Thanks!
>
> > On Oct 9, 11:31 pm, Gregg Williams <greg...@innerpaths.net> wrote:
>
> > > Thanks for your "ridiculously long instructions" on using cdt; I
> > > appreciate your thoroughness.
>
> > > I'm working on the %$#...@^@! Windows platform (Windows XP, to be
> > > precise), and I'm unable to set cdt-source-path in my .emacs file.
>
> > > I can get my Clojure REPL to start just fine:
>
> > > ----
> > > C:\tech>java -
> > > agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8021
> > > -client -cp c:\tech\clojure-contrib-1.2.0\target\clojure-
> > > contrib-1.2.0.jar;c:\te
> > > ch\clojure-1.2.0\clojure.jar clojure.main --repl
> > > Listening for transport dt_socket at address: 8021
> > > Clojure 1.2.0
> > > user=>
> > > ----
>
> > > Here's what I have in my .emacs file:
>
> > > ----
> > > (progn
> > >   (setq cdt-dir "/tech/cdt")
> > >   (setq cdt-source-path "/tech/clojure-1.2.0/src/jvm;/tech/
> > > clojure-1.2.0/src/clj;/tech/clojure-contrib-1.2.0/src/main/clojure")
> > >   (load-file (format "%s/ide/emacs/cdt.el" cdt-dir)))
> > > ----
>
> > > When I select and execute it from within Emacs, I get a message in the
> > > minibuffer that says "Loading c:/tech/cdt/ide/emacs/cdt.el
> > > (source)...done". But when I type M-x cdt and set the port to 8021,
> > > the following error message goes into the buffer named *gud-
> > > clojure.main*:
>
> > > ----
> > > Current directory is C:\Documents and Settings\add-minimum/
> > > java.lang.NoClassDefFoundError: clojure/main
> > > Caused by: java.lang.ClassNotFoundException: clojure.main
> > >         at java.net.URLClassLoader$1.run(Unknown Source)
> > >         at java.security.AccessController.doPrivileged(Native Method)
> > >         at java.net.URLClassLoader.findClass(Unknown Source)
> > >         at java.lang.ClassLoader.loadClass(Unknown Source)
> > >         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> > >         at java.lang.ClassLoader.loadClass(Unknown Source)
> > > Could not find the main class: clojure.main.  Program will exit.
> > > Exception in thread "main"
> > > Debugger exited abnormally with code 1
> > > ----
>
> > > I don't know how to handle Windows pathnames, especially the drive
> > > letter, in the context of (setq cdt-source-path.... I tried taking off
> > > the "/c/" or "c:\" for cdt-dir, and that seems to work. But trying the
> > > same thing for cdt-source-path doesn't seem to work. I'm wondering,
> > > should path names be delimited by colons (as Unix expects), or by
> > > semicolons (as Windows expects). I've tried various combinations, I've
> > > tried to find the Java conventions for Windows classpaths... nothing
> > > seems to work.
>
> > > Any suggestions from anybody will be appreciated. Thanks.
>
> > > On Sep 28, 12:40 am, George Jahad <cloj...@blackbirdsystems.net >
> > > wrote:
>
> > > > As some of you know, I suffer from a seemingly interminable obsession
> > > > with improving the Clojure debugging story.  It just seems so clear to
> > > > me that Clojure deserves a world class debugger, one befitting it's
> > > > power, beauty and elegance.  Maybe one day, we'll get there.  Till
> > > > then, here are my latest improvements to theCDT:
>
> > > > 1. Stepping
> > > > 2. Line number breakpoints
> > > > 3. An Emacs based front end which allows you to: step, set
> > > > breakpoints, catch exceptions, eval remote clojure expressions, and go
> > > > up and down the stack, in a much more natural way than with just the
> > > > command line.
>
> > > > When you want to eval the s-expr under the cursor, hit ^x^a^p!
>
> > > > CDTwill then serialize the s-expr, send it to the remote vm, evaluate
> > > > it there in the context of the current stack frame, and display the
> > > > result on the mode line.
>
> > > > Ridiculously long instructions on how to use it are 
> > > > here:http://georgejahad.com/clojure/emacs-cdt.html
>
> > > > I should emphasize that there is nothing Emacs specific about theCDT.  
> > > > In fact, I've been so spoiled by Clojure, I don't even enjoy
> > > > writing Elisp any more.  This front end was written in Emacs because
> > > > that's the IDE I'm most familiar with.  TheCDTcommand line is IDE
> > > > agnostic; it should be easy, (dare I say fun?), to port it to other
> > > > IDE's.  If there's interest, I'll detail how in a future post.
>
> > > > Many thanks to Fogus for the kind words, and to the Runa gang for
> > > > their continuing encouragement!
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to