Re: VimClojure 2

2009-03-15 Thread Meikel Brandmeyer

Hi,

Am 14.03.2009 um 15:10 schrieb Albert Cardona:


I have called :split so there are two buffers visible.
Then I shift+V and y to copy a line.
Then I control+w j to go to the upper window.
Then I p, and a new line pastes, not what I copied.
To paste, I have to 0p, i.e. paste the last user-yanked data.


This was reported now several times and I cannot reproduce
it here. Can you send me failing setup?


And yet another unexpected behaviour: when switching windows
with control+w j or k,  the current buffer is resized by one line,
and the other shrinked by one line as well, of course. Why?


Again, this works for me. Please try to get a failing setup,
so that I can reproduce the problem.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-14 Thread Meikel Brandmeyer

Hello Mark and fellow Vimmers,

Am 14.03.2009 um 03:56 schrieb Mark Feeney:


Anyway, user error, as you predicted above :)  Things are working much
better now.


I hope I didn't sound too harsh! If so, I apologise!

But this is really my experience from my daily life (also on the real  
user side,
not only developer side)! Pick an arbitrary topic and the chances are  
large,

that it is a problem due to misuse by the user.

* Namespaces
* Exceptions
* Macros (one of my favourites)
* Eval (another one of my favourites)
* Excel
* CD players (tapping the tray instead of using the close button)
* ...

Of course, software can be made more robust, but for a hobby project,
like VimClojure, I think there can be some level of goodwill expected
from the user that the software is not perfect.

And while writing this I noticed, that \ef actually tries to require  
the namespace
when it does not exist. So VimClojure already tries as best as  
possible to be

robust here. :)

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-14 Thread Albert Cardona


Hi Meikel,

Regarding namespaces, I would appreciate help understanding what looks
like a heisenbug.

I have a file at t2/data/core.clj, with namespace t2.data.core
The namespace (ns t2.data.core) does not :import or :use anything.
I open such file by :edit t2/data/core.clj
When switching to another buffer and then back, sometimes it complains
with a long error, the now famous line 23 nail error. But sometimes it
does not (?). Restarting vim solves this problem, until it catches on
again. It would help a lot if the error was more specific: which
expression failed? What was the nailgun trying to do? The current error
basically says nothing other than an error ocurred in the nailgun.
The shell where the nailgun server was opened doesn't print anything. It
would be a good place to print this nailgun server indigestions.

Also to note here that these multiline nailgun errors are a pain to have
in the vim minibuffer, for one has to press return several times until
the entire message of the error is printed in full. A Scratch buffer or
the shell where the nailgun runs would be a better place, leaving
perhaps a single line such as Error: check ng shell in the minibuffer.


Regarding the \sr Repl:

On occasions, it throws an error, altough the Scratch buffer opens
anyway with an inactive Repl in it (the cursor is at the top instead of
after the prompt, and no expressions may be entered with return.) If I
close it with esc :bd, and retype \sr, then the Repl opens fine.  It's
puzzling. And happens at random times.

Also: the \sr Repl becomes (again, sometimes) irresponsive (i.e. doesn't
evaluate anything) when I accidentally press control+w control+w while
in insert mode, which deletes one or two lines, depending upon when I
realize so. What is the proper way to reenable it, short of :bd and \sr
again?


It's true that most errors are on the user side. I've experienced this
both as user and as developer receiving bizarre complains from users of
my software. I my experience, detailed how-tos with detailed, precise
examples of operation go a very long way, much more than any description
in a manual.

Thanks for VimClojure. I'm loving it despite all the unexpected
reactions.

Albert
-- 
Albert Cardona
http://albert.rierol.net


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Yasuto TAKENAKA

In my environment, same error occurs ... although I have erased
Gorilla and previous vimclojure packages. I install it using my
installer script. If wrong, let me know.
--
#!/bin/sh
# installer.sh - a simple vimclojure installer.
# Please rewrite CLOJURE, CLOJURECONTRIB and VIMCLOJUREHOME.
#   The example is that CLOJURE is ~/opt/clojure/clojure.jar,
#   that CLOJURECONTRIB is ~/opt/clojure-contrib/clojure-contrib.jar
#   and that VIMCLOJUREHOME is ~/opt/vimclojure .

CLOJURE=${HOME}/opt/clojure/clojure.jar
CLOJURECONTRIB=${HOME}/opt/clojure-contrib/clojure-contrib.jar
NAILGUNCLIENT=ng
VIMCLOJUREHOME=${HOME}/opt/vimclojure

cp -r {autoload,doc,ftdetect,ftplugin,indent,syntax} ${HOME}/.vim
ant -Dnailgun-client=${NAILGUNCLIENT} -Dclojure.jar=${CLOJURE} -
Dclojure-contrib.jar=${CLOJURE-CONTRIB}

# ./ngserver is a shell script for clojure server of vimclojure.

echo '#!/bin/sh'  ngserver
echo java -cp ${CLOJURE}:${CLOJURECONTRIB}:${VIMCLOJUREHOME}/
vimclojure.jar com.martiansoftware.nailgun.NGServer 127.0.0.1 
ngserver
chmod 755 ngserver

# echo let vimclojure#NailgunClient=\${VIMCLOJUREHOME}/ng\ $
{HOME}/.vimrc
--

On 3月13日, 午前5:30, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  The README.txt file doesn't describe the files that need to be copied
  to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
  I haven't copied all the necessary files to my ~/.vim directory. Which
  files do I need to copy?

 Here is the copy command I used:

 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

 Here are the errors I'm getting.

 Error detected while processing function
 vimclojure#ExecuteNailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.N
 amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
 v920635/0
 Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
 line  131:
 E171: Missing :endif
 Error detected while processing function SNR9_LoadFTPlugin:
 line   17:
 E170: Missing :endfor

 I do have nailgun running. The window it's in says NGServer started
 on 127.0.0.1, port 2113.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Adrian Cuthbertson

I think the  could be a problem in generating your path in .vimrc. Try...
let vimclojure#NailgunClient='/your_path/vimclojure-2.0.0/ng'

and don't forget also for .vimrc
let g:clj_want_gorilla = 1

Rgds, Adrian.

On Fri, Mar 13, 2009 at 2:09 AM, Yasuto TAKENAKA y.taken...@gmail.com wrote:

 In my environment, same error occurs ... although I have erased
 Gorilla and previous vimclojure packages. I install it using my
 installer script. If wrong, let me know.
 --
 #!/bin/sh
 # installer.sh - a simple vimclojure installer.
 # Please rewrite CLOJURE, CLOJURECONTRIB and VIMCLOJUREHOME.
 #   The example is that CLOJURE is ~/opt/clojure/clojure.jar,
 #   that CLOJURECONTRIB is ~/opt/clojure-contrib/clojure-contrib.jar
 #   and that VIMCLOJUREHOME is ~/opt/vimclojure .

 CLOJURE=${HOME}/opt/clojure/clojure.jar
 CLOJURECONTRIB=${HOME}/opt/clojure-contrib/clojure-contrib.jar
 NAILGUNCLIENT=ng
 VIMCLOJUREHOME=${HOME}/opt/vimclojure

 cp -r {autoload,doc,ftdetect,ftplugin,indent,syntax} ${HOME}/.vim
 ant -Dnailgun-client=${NAILGUNCLIENT} -Dclojure.jar=${CLOJURE} -
 Dclojure-contrib.jar=${CLOJURE-CONTRIB}

 # ./ngserver is a shell script for clojure server of vimclojure.

 echo '#!/bin/sh'  ngserver
 echo java -cp ${CLOJURE}:${CLOJURECONTRIB}:${VIMCLOJUREHOME}/
 vimclojure.jar com.martiansoftware.nailgun.NGServer 127.0.0.1 
 ngserver
 chmod 755 ngserver

 # echo let vimclojure#NailgunClient=\${VIMCLOJUREHOME}/ng\ $
 {HOME}/.vimrc
 --

 On 3月13日, 午前5:30, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  The README.txt file doesn't describe the files that need to be copied
  to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
  I haven't copied all the necessary files to my ~/.vim directory. Which
  files do I need to copy?

 Here is the copy command I used:

 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

 Here are the errors I'm getting.

 Error detected while processing function
 vimclojure#ExecuteNailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.N
 amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
 v920635/0
 Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
 line  131:
 E171: Missing :endif
 Error detected while processing function SNR9_LoadFTPlugin:
 line   17:
 E170: Missing :endfor

 I do have nailgun running. The window it's in says NGServer started
 on 127.0.0.1, port 2113.

 


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Mark Volkmann

On Fri, Mar 13, 2009 at 2:50 AM, Adrian Cuthbertson
adrian.cuthbert...@gmail.com wrote:

 I think the  could be a problem in generating your path in .vimrc. Try...
 let vimclojure#NailgunClient='/your_path/vimclojure-2.0.0/ng'

 and don't forget also for .vimrc
 let g:clj_want_gorilla = 1

I fixed the let vimclojure line to be just like yours and I already
had the clj_want_gorilla line, but I'm getting the same error. Here
are all the lines I added to my .vimrc.

let g:clj_want_gorilla=1
let g:clj_highlight_builtins=1
let g:clj_highlight_contrib=1
let g:clj_paren_rainbow=1
let 
vimclojure#NailgunClient='/Users/Mark/Documents/Programming/Languages/Clojure/vimclojure-2.0.0/ng'

BTW, I'm running on a Mac with OS X 10.5.

 On Fri, Mar 13, 2009 at 2:09 AM, Yasuto TAKENAKA y.taken...@gmail.com wrote:

 In my environment, same error occurs ... although I have erased
 Gorilla and previous vimclojure packages. I install it using my
 installer script. If wrong, let me know.
 --
 #!/bin/sh
 # installer.sh - a simple vimclojure installer.
 # Please rewrite CLOJURE, CLOJURECONTRIB and VIMCLOJUREHOME.
 #   The example is that CLOJURE is ~/opt/clojure/clojure.jar,
 #   that CLOJURECONTRIB is ~/opt/clojure-contrib/clojure-contrib.jar
 #   and that VIMCLOJUREHOME is ~/opt/vimclojure .

 CLOJURE=${HOME}/opt/clojure/clojure.jar
 CLOJURECONTRIB=${HOME}/opt/clojure-contrib/clojure-contrib.jar
 NAILGUNCLIENT=ng
 VIMCLOJUREHOME=${HOME}/opt/vimclojure

 cp -r {autoload,doc,ftdetect,ftplugin,indent,syntax} ${HOME}/.vim
 ant -Dnailgun-client=${NAILGUNCLIENT} -Dclojure.jar=${CLOJURE} -
 Dclojure-contrib.jar=${CLOJURE-CONTRIB}

 # ./ngserver is a shell script for clojure server of vimclojure.

 echo '#!/bin/sh'  ngserver
 echo java -cp ${CLOJURE}:${CLOJURECONTRIB}:${VIMCLOJUREHOME}/
 vimclojure.jar com.martiansoftware.nailgun.NGServer 127.0.0.1 
 ngserver
 chmod 755 ngserver

 # echo let vimclojure#NailgunClient=\${VIMCLOJUREHOME}/ng\ $
 {HOME}/.vimrc
 --

 On 3月13日, 午前5:30, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  The README.txt file doesn't describe the files that need to be copied
  to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
  I haven't copied all the necessary files to my ~/.vim directory. Which
  files do I need to copy?

 Here is the copy command I used:

 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

 Here are the errors I'm getting.

 Error detected while processing function
 vimclojure#ExecuteNailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.N
 amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
 v920635/0
 Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
 line  131:
 E171: Missing :endif
 Error detected while processing function SNR9_LoadFTPlugin:
 line   17:
 E170: Missing :endfor

 I do have nailgun running. The window it's in says NGServer started
 on 127.0.0.1, port 2113.

 


 




-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Adrian Cuthbertson

Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
the vim that comes with leopard - vim version 7.0.x

I first downloaded and tried MacVim 7.2 from
http://code.google.com/p/macvim/ but I couldn't unpack the .tbz files.

I then tried the Vim.app 7.2 from
http://sourceforge.net/projects/macosxvim/ and this works
fantastically. I'm not sure what the difference is between this and
MacVim - there's not much documentation.

The setup was easy - I just installed from the .dmg and created a
.gvimrc in addition to my .vimrc and .vim directory as before. The
only problem I had was in getting vim to see the ng client but that
was solved as per my previous post.

Hope that helps.

On Fri, Mar 13, 2009 at 1:51 PM, Mark Volkmann
r.mark.volkm...@gmail.com wrote:

 On Fri, Mar 13, 2009 at 2:50 AM, Adrian Cuthbertson
 adrian.cuthbert...@gmail.com wrote:

 I think the  could be a problem in generating your path in .vimrc. Try...
 let vimclojure#NailgunClient='/your_path/vimclojure-2.0.0/ng'

 and don't forget also for .vimrc
 let g:clj_want_gorilla = 1

 I fixed the let vimclojure line to be just like yours and I already
 had the clj_want_gorilla line, but I'm getting the same error. Here
 are all the lines I added to my .vimrc.

 let g:clj_want_gorilla=1
 let g:clj_highlight_builtins=1
 let g:clj_highlight_contrib=1
 let g:clj_paren_rainbow=1
 let 
 vimclojure#NailgunClient='/Users/Mark/Documents/Programming/Languages/Clojure/vimclojure-2.0.0/ng'

 BTW, I'm running on a Mac with OS X 10.5.

 On Fri, Mar 13, 2009 at 2:09 AM, Yasuto TAKENAKA y.taken...@gmail.com 
 wrote:

 In my environment, same error occurs ... although I have erased
 Gorilla and previous vimclojure packages. I install it using my
 installer script. If wrong, let me know.
 --
 #!/bin/sh
 # installer.sh - a simple vimclojure installer.
 # Please rewrite CLOJURE, CLOJURECONTRIB and VIMCLOJUREHOME.
 #   The example is that CLOJURE is ~/opt/clojure/clojure.jar,
 #   that CLOJURECONTRIB is ~/opt/clojure-contrib/clojure-contrib.jar
 #   and that VIMCLOJUREHOME is ~/opt/vimclojure .

 CLOJURE=${HOME}/opt/clojure/clojure.jar
 CLOJURECONTRIB=${HOME}/opt/clojure-contrib/clojure-contrib.jar
 NAILGUNCLIENT=ng
 VIMCLOJUREHOME=${HOME}/opt/vimclojure

 cp -r {autoload,doc,ftdetect,ftplugin,indent,syntax} ${HOME}/.vim
 ant -Dnailgun-client=${NAILGUNCLIENT} -Dclojure.jar=${CLOJURE} -
 Dclojure-contrib.jar=${CLOJURE-CONTRIB}

 # ./ngserver is a shell script for clojure server of vimclojure.

 echo '#!/bin/sh'  ngserver
 echo java -cp ${CLOJURE}:${CLOJURECONTRIB}:${VIMCLOJUREHOME}/
 vimclojure.jar com.martiansoftware.nailgun.NGServer 127.0.0.1 
 ngserver
 chmod 755 ngserver

 # echo let vimclojure#NailgunClient=\${VIMCLOJUREHOME}/ng\ $
 {HOME}/.vimrc
 --

 On 3月13日, 午前5:30, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  The README.txt file doesn't describe the files that need to be copied
  to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
  I haven't copied all the necessary files to my ~/.vim directory. Which
  files do I need to copy?

 Here is the copy command I used:

 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

 Here are the errors I'm getting.

 Error detected while processing function
 vimclojure#ExecuteNailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.N
 amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
 v920635/0
 Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
 line  131:
 E171: Missing :endif
 Error detected while processing function SNR9_LoadFTPlugin:
 line   17:
 E170: Missing :endfor

 I do have nailgun running. The window it's in says NGServer started
 on 127.0.0.1, port 2113.

 


 




 --
 R. Mark Volkmann
 Object Computing, Inc.

 


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Albert Cardona


Since this is a thread on VimClojure. First of all to say I am looking 
forward to vimclojure working perfectly. Here are some problems I don't 
understand:

If I open a .clj file without the ng server running, it complains loudly 
and does not switch on syntax highlighting for clojure. Why no syntax on?

So I launch the ng.

The ng server is running happily, and on launching it reported:

   NGServer started on 127.0.0.1, port 2113.


Then I acess a .clj file. It 'works' fine, but I can't execute anything. 
Here's a snipped of a file test/patch.clj, opened from vim as vim 
test/patch.clj, plus the overlayed error mesage triggered on pushing 
\ef to execute the whole file:


-8
(ns test.patch
  (:import (ij.gui OvalRoi Roi ShapeRoi)
   (ij IJ ImagePlus)
   (ij.process ByteProcessor)
   (ini.trakem2.display Display Patch Selection)
   (mpicbg.trakem2.transform MovingLeastSquaresTransform)))

(defn punch-alpha-hole
  Create an alpha hole right in the middle of an image.
  [patch]
  (let [ip (.getImageProcessor patch)
Error detected while processing function 
vimclojure#EvalFile..vimclojure#Execute
NailWithInput:
line   23:
E605: Exception not caught: Couldn't execute Nail! ng 
de.kotka.vimclojure.nails.
Repl '-r' '-n' 'test.patch' '-f' 'test/patch.clj' /tmp/v953483/5
8--


The error points to line 23, which is the first let binding here:


8--
(defn punch-alpha-hole
  Create an alpha hole right in the middle of an image.
  [patch]
  (let [ip (.getImageProcessor patch)
  
8--


The above (complete) function runs just fine, if I run it by means other 
than vimclojure.

What is vimclojure expecting? The classpath of the ng is correct and 
contains all necessary jar files. I cannot see what is wrong.

I would appreciate help in understanding what the error means. Thanks.

Albert

-- 
Albert Cardona
http://albert.rierol.net


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Mark Volkmann

On Fri, Mar 13, 2009 at 7:27 AM, Adrian Cuthbertson
adrian.cuthbert...@gmail.com wrote:

 Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
 the vim that comes with leopard - vim version 7.0.x

 I first downloaded and tried MacVim 7.2 from
 http://code.google.com/p/macvim/ but I couldn't unpack the .tbz files.

 I then tried the Vim.app 7.2 from
 http://sourceforge.net/projects/macosxvim/ and this works
 fantastically. I'm not sure what the difference is between this and
 MacVim - there's not much documentation.

 The setup was easy - I just installed from the .dmg and created a
 .gvimrc in addition to my .vimrc and .vim directory as before. The
 only problem I had was in getting vim to see the ng client but that
 was solved as per my previous post.

I already had Vim.app installed, but hadn't tried running VimClojure
commands from it. I just tried at it worked! I didn't add a .gvimrc
file. The .vimrc file I already had was sufficient.

So this casts a new light on the problem. It appears to be specific to
the vim that is a standard part of Mac OS X.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Yasuto TAKENAKA

Do you try to run the command, ./ng
de.kotka.vimclojure.nails.NamespaceOfFile ?

The following is the result when I tried to run this after starting a
ngserver:

 cd your-vimcljure-directory
./ng  de.kotka.vimclojure.nails.NamespaceOfFile
java.lang.ClassNotFoundException:
de.kotka.vimclojure.nails.NamespaceOfFile
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.martiansoftware.nailgun.NGSession.run(Unknown Source)

I also have  the same problem you confronted.  As I am a beginner java
and clojure,
I mistake setting up  CLASSPATH value.

On 3月13日, 午後8:55, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Thu, Mar 12, 2009 at 6:05 PM, Kyle Schaffrick k...@raidi.us wrote:

  Here are the errors I'm getting.

  Error detected while processing function
  vimclojure#ExecuteNailWithInput:
  line   23:
  E605: Exception not caught: Couldn't execute Nail! ng
  de.kotka.vimclojure.nails.N
  amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
  v920635/0
  Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
  line  131:
  E171: Missing :endif
  Error detected while processing function SNR9_LoadFTPlugin:
  line   17:
  E170: Missing :endfor

  I got this exact error also at first. It turned out there was an
  extraneous file in my .vim from an older version of Gorilla, pretty sure
  it was ~/.vim/after/ftplugin/clojure.vim.

  Deleting this file and restarting Vim fixed it for me.

 I deleted all the files related to VimClojure and Gorilla from under
 my .vim directory and then copied the VimClojure files there again,
 but I'm still getting the same error.

 --
 R. Mark Volkmann
 Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Meikel Brandmeyer

Hi Albert,

Am 13.03.2009 um 13:42 schrieb Albert Cardona:

If I open a .clj file without the ng server running, it complains  
loudly
and does not switch on syntax highlighting for clojure. Why no  
syntax on?


This happens for me if I open a file via the NerdTree plugin.
I'm not sure why this is happening. A simple :e will fix it. But
I would file this currently under don't do it, ie. if you set
clj_want_gorilla, make sure the server is running. I will try
to make this more robust, so when no server is running the
fallback is the static behaviour as without clj_want_gorilla.
(Or start a server, depending on how easily this can be
done from inside vim)

Then I acess a .clj file. It 'works' fine, but I can't execute  
anything.

Here's a snipped of a file test/patch.clj, opened from vim as vim
test/patch.clj, plus the overlayed error mesage triggered on pushing
\ef to execute the whole file:


This is no problem of your script nor is it a problem of vimclojure.
This is a misuse of \ef although a very subtle one. I will add a
note to the documentation. Let me explain:


-8
(ns test.patch
 (:import (ij.gui OvalRoi Roi ShapeRoi)
  (ij IJ ImagePlus)
  (ij.process ByteProcessor)
  (ini.trakem2.display Display Patch Selection)
  (mpicbg.trakem2.transform MovingLeastSquaresTransform)))



8--


When evaluating the file, vimclojure first tries to change the
namespace to test.patch. This namespace is not loaded and
hence you get an error. (When you execute the ng command
from the error message manually, will get a corresponding
exception from the clojure side).

But we cannot simply create the namespace if it doesn't exist.
Consider a second file, which is loaded for the namespace
via the :load directive in the ns form. In this file there is only
a in-ns at the top. Imagine we simply created the namespace
and evaled the code. Then all the above imports were missing.

So the Right Way is to use \rf (RequireFile) the first time to
set up the namespace correctly (it is loaded via a require
call). Then you may use \ef to reload single files afterwards.

It is important to understand that \el (EvalLine), \eb (EvalBlock),
\ep (EvalParagraph) and \ef (EvalFile) do not work on
the structure of the code like \rf, \et or \me do. I added them
because they were requested, but you have to take care that
you pay attention to what you are doing. Although I admit
that this case is a little bit tricky.

I will point this out more clearly in the documentation.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-13 Thread Meikel Brandmeyer

Hi,

Am 13.03.2009 um 13:45 schrieb Mark Volkmann:


Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
the vim that comes with leopard - vim version 7.0.x



So this casts a new light on the problem. It appears to be specific to
the vim that is a standard part of Mac OS X.


Ah. Ok. I use MacVim.app and it works fine. I would recommend
it without hesitating.

Please note: I cannot support stone age vim versions. I simply
don't have the time to install and test all those versions. I only
guarantee a working setup for reasonable recent versions.

If I would support such old version (once someone complained
with a Vim 6.something), I would have to re-implement 90% of
the now available library functions. That's certainly not a Good
Thing.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-13 Thread Mark Feeney

I've been struggling with the same issues (on Windows, not that it
appears to matter).

The line 23 in the error means the 23rd line of the function
vimclojure#ExecuteNailWithInput(nail, input, ...) in vimfiles/autoload/
vimclojure.vim.  It's unrelated to the code you're trying to execute.

I dug into this a bit and discussed with Meikel offline (next time
I'll just post to the list!).  There is a feature/bug with the way
VimClojure deals with files that use namespaces.  It seems a ns must
exist before VimClojure can evaluate code in that ns.  There's a
facility in place to make that happen (\rf), but I think there are
still some issues (or maybe just user error on my part):

From Meikel in email:


To evaluate the functions in the right namespace we have to
change there, obviously. In foo.clj there is no namespace so
the forms are evaluated in the user namespace. This one is
always there as the Repl system used by VimClojure ensures
that.

In foo2.clj there is a namespace defined, but it is not created,
yet. That is a problem. Consider the following setup:

foo2.clj:
(in-ns 'test)

foo3.clj:
(ns test
 (:use some-other-stuff)
 (:load foo2))

What should VimClojure do when \ef'ing foo2.clj? Just creating
the namespace doesn't work, because then some-other-stuff
is missing. Also there were some special cases with :refer-clojure
where namespace must or must not exist before. I have to
check on that one. Maybe it's already obsolete.

However: Just creating the namespace doesn't work. The first
time loading the namespace use \rf (RequireFile). This uses
require to load the namespace and is setting up everything in
the right way. Afterwards you can use \ef to reload single files.

Maybe I should add this to the docs.


So you could try \rf, but for me this still doesn't quite work for
me.  If I have just one file:

foo.clj

(ns foo)
(+ 1 1)

I can't \ef it.  I get the same line 23 error you get.  If I \rf it
I get:

(clojure.core/load /foo)
#CompilerException java.io.FileNotFoundException: Could not locate
foo__init.class or foo.clj on classpath:  (REPL:0)

I've tried making sure the path to foo.clj is on my classpath, but
that doesn't appear to work either.  Not really sure what's up.

Work-arounds I've used:

1) don't set a namespace (just work in the user ns implicitly)
2) temporarily change your ns macro to put you in the user ns.  i.e.
in my example above, changing (ns foo) to (ns user) works, since the
user ns always exists.
3) Bring up the REPL (\sr) and execute your ns macro there before
\ef'ing or \et'ing your file.

Tons of promise with this new version of VimClojure.  Just some bugs
(or user education?) to get through first.


Mark.



On Mar 13, 8:42 am, Albert Cardona sapri...@gmail.com wrote:
 Since this is a thread on VimClojure. First of all to say I am looking
 forward to vimclojure working perfectly. Here are some problems I don't
 understand:

 If I open a .clj file without the ng server running, it complains loudly
 and does not switch on syntax highlighting for clojure. Why no syntax on?

 So I launch the ng.

 The ng server is running happily, and on launching it reported:

    NGServer started on 127.0.0.1, port 2113.

 Then I acess a .clj file. It 'works' fine, but I can't execute anything.
 Here's a snipped of a file test/patch.clj, opened from vim as vim
 test/patch.clj, plus the overlayed error mesage triggered on pushing
 \ef to execute the whole file:

 -8
 (ns test.patch
   (:import (ij.gui OvalRoi Roi ShapeRoi)
            (ij IJ ImagePlus)
            (ij.process ByteProcessor)
            (ini.trakem2.display Display Patch Selection)
            (mpicbg.trakem2.transform MovingLeastSquaresTransform)))

 (defn punch-alpha-hole
   Create an alpha hole right in the middle of an image.
   [patch]
   (let [ip (.getImageProcessor patch)
 Error detected while processing function
 vimclojure#EvalFile..vimclojure#Execute
 NailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.
 Repl '-r' '-n' 'test.patch' '-f' 'test/patch.clj' /tmp/v953483/5
 8--

 The error points to line 23, which is the first let binding here:

 8--
 (defn punch-alpha-hole
   Create an alpha hole right in the middle of an image.
   [patch]
   (let [ip (.getImageProcessor patch)
       
 8--

 The above (complete) function runs just fine, if I run it by means other
 than vimclojure.

 What is vimclojure expecting? The classpath of the ng is correct and
 contains all necessary jar files. I cannot see what is wrong.

 I would appreciate help in understanding what the error means. Thanks.

 Albert

 --
 Albert Cardonahttp://albert.rierol.net
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email 

Re: VimClojure 2

2009-03-13 Thread Albert Cardona

Hi Meikel,

Thank you for the prompt response.

 I will point this out more clearly in the documentation.



And future users will be greateful for that!

VimClojure is looking great Meikel.

Albert

-- 
Albert Cardona
http://albert.rierol.net


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Mark Volkmann

On Fri, Mar 13, 2009 at 8:45 AM, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 Am 13.03.2009 um 13:45 schrieb Mark Volkmann:

 Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
 the vim that comes with leopard - vim version 7.0.x

 So this casts a new light on the problem. It appears to be specific to
 the vim that is a standard part of Mac OS X.

 Ah. Ok. I use MacVim.app and it works fine. I would recommend
 it without hesitating.

 Please note: I cannot support stone age vim versions. I simply
 don't have the time to install and test all those versions. I only
 guarantee a working setup for reasonable recent versions.

 If I would support such old version (once someone complained
 with a Vim 6.something), I would have to re-implement 90% of
 the now available library functions. That's certainly not a Good
 Thing.

The version of the Vim that my Mac uses when a launch it from a
Terminal window isn't ancient. It's 7.2.22. It seems likely that the
issue is related to configuration instead of the version of Vim being
used. What happens if you try to use VimClojure features from a Vim
session that is started from a Terminal window?

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-13 Thread Meikel Brandmeyer

Hi,

Am 13.03.2009 um 15:02 schrieb Mark Feeney:


So you could try \rf, but for me this still doesn't quite work for
me.  If I have just one file:

foo.clj

(ns foo)
(+ 1 1)

I can't \ef it.  I get the same line 23 error you get.  If I \rf it
I get:

(clojure.core/load /foo)
#CompilerException java.io.FileNotFoundException: Could not locate
foo__init.class or foo.clj on classpath:  (REPL:0)

I've tried making sure the path to foo.clj is on my classpath, but
that doesn't appear to work either.  Not really sure what's up.


Make sure, that the file is in the Classpath of the *server* not
the client. The client is only a proxy transferring in- and output
between the shell and the server. So the important part for
Java things like the Classpath is the server.


Work-arounds I've used:

1) don't set a namespace (just work in the user ns implicitly)
2) temporarily change your ns macro to put you in the user ns.  i.e.
in my example above, changing (ns foo) to (ns user) works, since the
user ns always exists.
3) Bring up the REPL (\sr) and execute your ns macro there before
\ef'ing or \et'ing your file.


These all work, because you circumvent the classpath.


Tons of promise with this new version of VimClojure.  Just some bugs
(or user education?) to get through first.


I boldly claim, that that's user education. 95% of problems
stem from misuse by the user. The above case of \ef vs. \rf
is how Clojure works. \rf goes the rigth way through require
setting up the namespace correctly. \ef is just a convenience.
But that's not a reason for being lazy. If you don't setup the
environment correctly, things won't work.

But VimClojure is not perfect. I will try make it more robust
and to point out such things in the docs.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-13 Thread Meikel Brandmeyer

Hi,

Am 13.03.2009 um 16:13 schrieb Mark Volkmann:


The version of the Vim that my Mac uses when a launch it from a
Terminal window isn't ancient. It's 7.2.22. It seems likely that the
issue is related to configuration instead of the version of Vim being
used. What happens if you try to use VimClojure features from a Vim
session that is started from a Terminal window?


My OS X own vim is also 7.2.22 and it works perfectly from the Terminal.
I can't find a difference in your configuration compared to mine.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


VimClojure 2

2009-03-12 Thread Mark Volkmann

The README.txt file doesn't describe the files that need to be copied
to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
I haven't copied all the necessary files to my ~/.vim directory. Which
files do I need to copy?

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-12 Thread Mark Volkmann

On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 The README.txt file doesn't describe the files that need to be copied
 to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
 I haven't copied all the necessary files to my ~/.vim directory. Which
 files do I need to copy?

Here is the copy command I used:

cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

Here are the errors I'm getting.

Error detected while processing function
vimclojure#ExecuteNailWithInput:
line   23:
E605: Exception not caught: Couldn't execute Nail! ng
de.kotka.vimclojure.nails.N
amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
v920635/0
Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
line  131:
E171: Missing :endif
Error detected while processing function SNR9_LoadFTPlugin:
line   17:
E170: Missing :endfor

I do have nailgun running. The window it's in says NGServer started
on 127.0.0.1, port 2113.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-12 Thread Meikel Brandmeyer

Hi,

Am 12.03.2009 um 21:30 schrieb Mark Volkmann:


On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

The README.txt file doesn't describe the files that need to be copied
to ~/.vim. I'm getting errors starting Vim now. I suspect it's  
because
I haven't copied all the necessary files to my ~/.vim directory.  
Which

files do I need to copy?


Here is the copy command I used:

cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

Here are the errors I'm getting.


Did you copy the ng client somewhere in your path?
Or adjusted the location in your .vimrc using

let vimclojure#NailgunClient = /path/to/your/ng

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: VimClojure 2

2009-03-12 Thread Mark Volkmann

On Thu, Mar 12, 2009 at 3:37 PM, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 Am 12.03.2009 um 21:30 schrieb Mark Volkmann:

 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

 The README.txt file doesn't describe the files that need to be copied
 to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
 I haven't copied all the necessary files to my ~/.vim directory. Which
 files do I need to copy?

 Here is the copy command I used:

 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

 Here are the errors I'm getting.

 Did you copy the ng client somewhere in your path?

Yes. Running which ng finds it.

 Or adjusted the location in your .vimrc using

 let vimclojure#NailgunClient = /path/to/your/ng

I hadn't done that. I realize I don't need to add that AND have it in
my path, but I added that line to my .vimrc file just for good
measure. I'm still getting the same error messages.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-12 Thread Attila Babo

On Thu, Mar 12, 2009 at 9:30 PM, Mark Volkmann
r.mark.volkm...@gmail.com wrote:
 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim
You don't need the content of bin folder under ~/.vim

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-12 Thread Mark Feeney

I've had this one.  For me it was failure to have vimclojure.jar in
the classpath of the nailgun server.

Here's how I start the server on Windows:

@echo off
set VIMCLOJURE_JAR=c:\vim\vimfiles\vimclojure.jar
set CLOJURE_JAR=c:\java\clojure-read-only\clojure.jar
set CONTRIB_JAR=c:\java\clojure-contrib-read-only\clojure-contrib.jar
java -Xmx512m -cp %CLOJURE_JAR%;%CONTRIB_JAR%;%VIMCLOJURE_JAR%
com.martiansoftware.nailgun.NGServer 127.0.0.1




On Mar 12, 4:54 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Thu, Mar 12, 2009 at 3:37 PM, Meikel Brandmeyer m...@kotka.de wrote:
  Hi,

  Am 12.03.2009 um 21:30 schrieb Mark Volkmann:

  On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  The README.txt file doesn't describe the files that need to be copied
  to ~/.vim. I'm getting errors starting Vim now. I suspect it's because
  I haven't copied all the necessary files to my ~/.vim directory. Which
  files do I need to copy?

  Here is the copy command I used:

  cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim

  Here are the errors I'm getting.

  Did you copy the ng client somewhere in your path?

 Yes. Running which ng finds it.

  Or adjusted the location in your .vimrc using

  let vimclojure#NailgunClient = /path/to/your/ng

 I hadn't done that. I realize I don't need to add that AND have it in
 my path, but I added that line to my .vimrc file just for good
 measure. I'm still getting the same error messages.

 --
 R. Mark Volkmann
 Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: VimClojure 2

2009-03-12 Thread Kyle Schaffrick

On Thu, 12 Mar 2009 13:30:51 -0700 (PDT)
Mark Volkmann r.mark.volkm...@gmail.com wrote:

 
 On Mar 12, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
  The README.txt file doesn't describe the files that need to be
  copied to ~/.vim. I'm getting errors starting Vim now. I suspect
  it's because I haven't copied all the necessary files to my ~/.vim
  directory. Which files do I need to copy?
 
 Here is the copy command I used:
 
 cp -r {autoload,bin,doc,ftdetect,ftplugin,indent,syntax} ~/.vim
 
 Here are the errors I'm getting.
 
 Error detected while processing function
 vimclojure#ExecuteNailWithInput:
 line   23:
 E605: Exception not caught: Couldn't execute Nail! ng
 de.kotka.vimclojure.nails.N
 amespaceOfFile /var/folders/fd/fduD2R4HFwWXFCpC4prCMk+++TI/-Tmp-/
 v920635/0
 Error detected while processing /Users/Mark/.vim/ftplugin/clojure.vim:
 line  131:
 E171: Missing :endif
 Error detected while processing function SNR9_LoadFTPlugin:
 line   17:
 E170: Missing :endfor
 

I got this exact error also at first. It turned out there was an
extraneous file in my .vim from an older version of Gorilla, pretty sure
it was ~/.vim/after/ftplugin/clojure.vim.

Deleting this file and restarting Vim fixed it for me.

-Kyle

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---