oldbloke wrote:I want to be able to save what I'm writing and come back to it later and run it...
The "Emacs keyboard shortcuts" way:1.
Create a new file via C-x C-f
and give the file a name with a ".lisp" extension like "myfile.lisp". Emacs recognizes files with a ".lisp" extension automatically as Lisp code and switches the buffer to lisp-mode.
You can switch any Emacs buffer to Lisp mode by typing: M-x
Type your Lisp code in the "myfile.lisp" buffer and save it to disk via C-x C-s
See the Emacs manual File Handling
for more file commands. It's also possible to load and save files via the "File" menu in the Emacs menu bar.3.
Load the code from the "myfile.lisp" buffer into Common Lisp via C-c C-k
See the SLIME manual Compilation commands
how to compile and load Common Lisp code via Emacs keyboard shortcuts.
In the Emacs "myfile.lisp" buffer there should appear a SLIME menu in the Emacs menu bar. In the SLIME menu you can find the most important SLIME commands and their keyboard shortcuts. This is faster than reading the SLIME manual.
You can also load a file with Common Lisp code from the SLIME REPL:
- Code: Select all
CL-USER> (load "myfile.lisp")
If you get a "file not found" error then you must specify the file with the full pathname.
If you like watching videos:
As you apparently already have managed to get SLIME running, ignore the "you should always use the newest SLIME version from CVS" advice from the videos and use your SLIME version until you find a reason that makes an update really necessary.