Using Slate

From SlateWiki

Editing Slate Code

We provide both Vi and Emacs-based editing modes.

The (X)Emacs mode generally supports more features, including an enhanced mode for interacting with the interpreter.

To use the emacs mode, run sudo make install or put the following into your .emacs file:

(pushnew "~/slate/etc" load-path)
(defconst slate-cmd "~/slate/vm")
(defconst slate-dir "~/slate/")
(defvar slate-args '("/full/path/to/slate/slate.image"))
(require 'slate-mode)

substituting your Slate directory and whatever the command and arguments are for the runtime that you have: the slate-cmd will be the VM binary's name, and the slate-args will be whatever flags and image name are most convenient for immediate use. All of these may be changed while using Emacs.

Post-0.3.5 Release: just type make edit.

Help for the emacs mode is provided by typing Ctrl-h and then m (without holding Ctrl) when you have opened a Slate source file.

The interaction mode (started via M-x slate or Ctrl-c m) has further command-line assistance that is described with the same keystrokes once you start it. The following statement seems not to be true anymore as of Slate 0.3.3: Right now, you have to start the interaction mode while in a file that is in your slate root directory, to give it the right path defaults for loading other slate files (if you don't do it, you'll get slate to report Could not connect to some/file.slate errors).