Page 1 of 1
REPL working directory?
Posted: Sat May 11, 2013 1:29 am
by borgauf
When in Emacs, if I start newlisp mode, then call up a NL REPL, how can I find out what the REPL's "working directory" is? For example,
gives an error, but if I copy link.lsp to a ./newlisp directory, and give the full path:
Code: Select all
(load "/home/myhome/Programs/newlisp/link.lsp")
it works. Will I always have to tell it the entire path?
Re: REPL working directory?
Posted: Sat May 11, 2013 1:57 am
by rickyboy
borgauf wrote:When in Emacs, if I start newlisp mode, then call up a NL REPL, how can I find out what the REPL's "working directory" is?
Like this:
Code: Select all
newLISP v.10.4.5 on OSX IPv4/6 UTF-8 libffi, execute 'newlisp -h' for more info.
> (real-path)
"/Users/rickyboy"
Re: REPL working directory?
Posted: Sat May 11, 2013 7:11 am
by cormullion
Re: REPL working directory?
Posted: Sun May 12, 2013 6:13 pm
by rickyboy
Nice, cormullion! I'm almost sure you wrote this. Great job, I'm freely stealing code from this page and I'm going to pawn it off as my own. :) Seriously, nice resource and I have already plugged in some of it in my own stuff (e.g. I needed a
dirname function of which you provided the guts). Thanks!
Re: REPL working directory?
Posted: Sun May 12, 2013 7:02 pm
by cormullion
Yes, I did the bad bits, and some of the good bits, the rest of the good bits are from other contributors... And the examples ran correctly for one version of newLISP, even if they've broken since then... :)