Friday, September 11, 2015

Setup notes on Emacs and Common Lisp

I recently thought about Lisp again, and found last time when I was planning to learn Lisp has been six years ago... O__O

This time I will not to learn Lisp with Vim, but with Emacs.

I am following Practical Common Lisp and found there's a so-called Lisp in a Box package, but I decided not to use it now. My plan is to set up a working environment in Ubuntu using more common approaches.

Here are something I have done so far, and they are left here as a note.

  1. Installed Emacs, Slime, and CLisp:
  2. $sudo apt-get install emacs slime clisp

  3. Created ~/.emacs.d/slime/ (to be checked...)
  4. Add ~/.emacs with the content (copied from websites, some functions are not clear to me):
  5. ;; MELPA
    (when (>= emacs-major-version 24)
      (require 'package)
      (add-to-list
        'package-archives
        '("melpa" . "http://melpa.org/packages/")
        t) 
      (package-initialize))

    (setq inferior-lisp-program "clisp")
    ;; Setup load-path, autoloads and your lisp system
    (add-to-list 'load-path "~/.emacs.d/slime/")
    (require 'slime-autoloads)
    ;; Also setup the slime-fancy contrib
    ;;(add-to-list 'slime-contribs 'slime-fancy)
    ;;(setq tab-always-indent 'complete)

    ;;; for auto-complete
    (require 'auto-complete)
    (global-auto-complete-mode t)
    ;(add-to-list 'ac-modes 'lisp-mode)
    (add-to-list 'completion-styles 'initials t)
  6. After adding MELPA, installed auto-complete by M-x package-install
  7. Also installed evil which enable ``evil-mode'' for Vim-like key strokes
  8. Use M-x slime to start it and the clisp