Posts Tagged ‘emacs’

Emacs configs and Github

November 7, 2009 Leave a comment

Its been quite a while since I last had time to write something! Well, not so much as lack of time, but maybe lack of stuff to write about. I have been working in a completely different domain for the last 3 months or so.

Anyways, one of the many things I did to keep my work environment sane and to make my emacs experience better, was to learn a bit of elisp. Then I almost threw away from the previous ~/.emacs that I had, and moved everything together in ~/.emacs.d . Now I’d say thats not the most brilliant idea, since, I made the decision and realised the backup was a week old!

However, my emacs configuration is a lot better now than what it used to be. Things are kept and maintained in a more logical order, or so I presume. Oh! and Github! I now have a real backup system, complete with delta and such.

For the more curious of you, here is the link to the public git repo of my emacs configuration directory.

So let me know how I can improve the elisp-foo in there. Also do share your own methodologies of maintaining your emacs config, the plugins and so on.

Categories: Linux Tags: ,

Setting up slime (emacs and sbcl)

February 7, 2009 6 comments

I decided to have a go at slime again. After having tried to learn lisp for a couple of weeks last year, I decided its time I learned something job oriented and hence spent a lot more time in python and java. However, not that I am getting bored, I am back to slime :).

I never got used to emacs really, but since slime looks like the best thing for lisp, and the cusp repl somehow doesnt work for me, I took the plunge again.

Installed the emacs-cvs and slime-cvs from the arch repositories,

pacman -S emacs-cvs slime-cvs

Now, after slime is installed it prints some lines, telling you to put certain things in your ~/.emacs . Strangely though, after I started slime from emacs, the REPL didn’t look familiar!! It was different last time, only I forgot what the difference is.

And then the “comma” didn’t work. It’s supposed to bring up a command prompt but instead it just printed a literal comma! Wonders wonders…

After almost a couple of hours of googling, and trying a bunch of things, I went in to #emacs @freenode, and learnt from there that slime now doesnt even load the REPL by default, and it was only then that I noticed that I wasn’t typing at the REPL but at the *inferior-lisp* buffer. No wonder the “comma” didnt work as well as a lot of other stuffs.

So, here is how the new slime works, you got to load up the repl and other stuffs manually. Here’s the slime part of my ~/.emacs

(eval-after-load “slime”
(setq slime-lisp-implementations
‘((sbcl (“/usr/bin/sbcl”))
(clisp (“/usr/bin/clisp”)))
common-lisp-hyperspec-root “/home/sujoy/documents/hyperspec/”)
(slime-setup ‘(slime-asdf
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function ‘slime-fuzzy-complete-symbol)
(add-hook ‘lisp-mode-hook (lambda () (slime-mode t)))))

(require ‘slime)

I am using SBCL, and put in these lines in my sbcl config to start the swank server automagically when sbcl starts 🙂

(require ‘asdf)
(push “/usr/share/emacs/site-lisp/slime/” asdf:*central-registry*)
(asdf: oos ‘asdf:load-op ‘swank)

; start swank
(setf swank:*use-dedicated-output-stream* nil)
(setf swank:*communication-style* :fd-handler)
(swank:create-server :dont-close t)

Well, I wrote none of this stuffs myself, mixed and matched from various configs to give me something that actually worked. Hopefully, this will save someone an hour of looking through old configs.

Categories: Programming Tags: ,