1
votes

Ok so i am trying to get started with lisp and slime and i am running into some problems. I have correctly installed emacs and slime and SBCL but i run into problems when trying to edit files. I am doing this all on mac osx lion though i dont think that makes a difference. So this maybe stupid but when i first enter the terminal i enter

$ emacs <myfile.lisp>

and then it opens up my file but then slime is not running so i do..

M-x: slime

but when i do that is now gone and all i see is the "REPL" (i think) anyway it just shows me

*

and then i can enter things like

*15
15

but now i can't get back to my file so that i can compile it. Could somone please hlep me through this? Thank you!

1
Have you tried C-x b (switch-to-buffer) or C-x C-b (list-buffers)?Terje D.
Press C-h t and go through it – it's worth it, then make sure Slime is configured correctly (you might want to use (slime-setup '(slime-fancy)) in your .emacs), and use C-c C-k in a lisp buffer to compile the file, or C-c C-c to compile toplevel forms. Also, most Emacs users (unlike, say, Vi users) leave Emacs running and open files with C-x C-f rather than opening a new session for each file.danlei

1 Answers

0
votes

Try C-x and C-x, that switches the current window's buffer to the previous or next buffer.

For a more interactive approach, split the screen vertically C-x2 (or horizontally C-x3), so you may see your code and try something out on the REPL. You may switch windows with C-xo (remember, O as in Other). You may close a window (not the buffer) with C-x0.

However, you'd better search for an Emacs tutorial, as all of this is very basic. I also recommend you start with a graphical Emacs, such as Emacs for Mac OS X. Some people prefer other versions, which integrate better with Mac OS X but also have lots of different keybindings and come with extra packages. I personally prefer having similar installations and keybindings in whatever OS I'm using.