From: Dan M. <dn...@po...> - 2005-03-22 19:33:05
|
Hi Peter! Peter Graves wrote: > On Mon, 21 Mar 2005 at 21:54:52 -0800, Dan Moniz wrote: [snip] > Sounds like what you want is a shell buffer. > > Add this line to ~/.j/prefs (or C:\.j\prefs): > > enableExperimentalFeatures = true > > Then do Alt X, "shell" (or Alt F9, which is its default mapping). > > On Windows XP this should get you a somewhat functional shell buffer. > (If you want a split window, F10 is your friend.) This worked great. I *knew* it was in there somewhere. Thanks! > On Unix platforms (inluding OS X), shell buffers require jpty, which > you'll need to build from source (jpty.c in the src/jpty directory); > you should put the jpty executable somewhere in your PATH. > > I don't have an OS X machine, so I don't know whether the current > version of jpty.c builds or works on OS X. Some years ago I spent a few > hours on a borrowed Mac trying to get an earlier version of jpty to > work on an earlier version of OS X, without success (but I don't think > I had the right development tool setup on that machine). I'll try this sometime this week and report back. > On Windows, cmd.exe should work without jpty. At one point, you could > even use bash under Cygwin if you built jpty with Cygwin gcc, but I > haven't tried that in a long time. > > Shell buffers work pretty well on Linux. I like shell buffers, and I > use Linux myself, so that combination has had lots of exercise. On the > other hand, I use Windows very rarely and OS X not at all, so shell > buffer support on those platforms is not nearly as good (and in the > case of OS X, possibly nonexistent). Tested patches are always welcome. > > Theoretically, Tab in a shell buffer does shell-like completion, and > Ctrl P and Ctrl N navigate through command history. Tab, C-p, and C-n all work in the Windows (cmd.exe) shell. I notice when I run irb (as an example) with readline completion from a cmd.exe spawned inside a shell buffer, tab isn't recognized, so I think it's not being passed to irb for some reason. Where ought I look in the j code to see if I can diagnose this and hack up a patch? [snip] > Console Lisps are best run in Lisp shells: do Alt X, "lisp [path-to- > lisp-executable]", e.g. Alt X, "lisp /usr/bin/lisp" to run cmucl on > Linux. If you don't specify a Lisp executable, you'll get ABCL. Lisp > shells for Lisps other than ABCL require jpty on Unix platforms. > > There's also slime-for-j, which is supported for ABCL, SBCL, and > Allegro: Alt X, "slime [path-to-lisp-executable]". I notice the j website cautioned "SLIME for j" as being very alpha code; I assume it's further along now given the development on ABCL? I'll try this with ACL and CLISP later today on my Windows machine. [snip] >>Bonus points if I can write a function in ABCL that will take the >>contents of the current buffer and redirect it as stdin to the >>minibuffer (I already have commands in j to spawn a cmd.exe outside >>of j and eval either a saved file or selected code). > > I don't think this exists per se, but it shouldn't be too hard to > write such a thing. There might be something vaguely similar in > slime.lisp (slime-eval-region, maybe). I'll look into it. Sounds good! Thanks for your informative reply, and for your work on j! -- Dan Moniz <dn...@po...> [http://www.pobox.com/~dnm/] |