Showing posts with label lisp. Show all posts
Showing posts with label lisp. Show all posts

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

Monday, October 26, 2009

[SW] Learning Lsip using Vim as the editor

I prefer Vim over Emacs. One day, I happened to be curious about Lisp, and then found the page ``Practical Common Lisp.'' The so-called ``programming environment'' confused me. Furthermore, Emacs seems to be the standard (or mainstream) editor/environment for the Lisp programming.

I've set the Emacs and SLIME for a try, but it's not easy for me to remember the key stroking in Emacs. So I also found some approaches to let me learning Lisp with my beloved Vim.

The first approach I found was: slime.vim, but I do neither understand the script nor the steps. After trying and trying, I gave it up.

The second approach is to install the Limp, a plugin for Vim. It does not work identically to what has shown on the web page, but it seems not bad and simple enough for me.

---
(Maybe my problems are due to my poor understanding of how Lisp works.)

[SW] Emacs and SLIME for Common Lisp

I am not familiar with Emacs, but I still tried to install Emacs as well as SLIME for trial.

Here are simple steps for setting all these up:
$ sudo apt-get install clisp emacs slime sbcl cl-asdf

Then, in the .emacs file:
(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/common-lisp/source/slime/")
(require 'slime)
(slime-setup)

---
Ref: How to set up Emacs + SLIME + SBCL under GNU/Linux