Setting Up PCLinuxOS 2007 for Lisp Hacking

So I picked up a copy of PCLinuxOS 2007. Pop it in the drive, answer a few dialogs, and voila… we have a shiny new desktop. Time for some Emacs action!

I open up a Konsole and type in ’emacs’ and… I hear the whirring/clunking sound of a Millenium Falcon failing to make the jump to light speed. Hmm…. I guess we know what side of the holy wars these PCLinusOS guys are on!

So I go into the Package Manager. It looks a lot like the Cygwin version, except its very easy to search it and get around in it. I mark the emacs package for installation and “Apply” the changes. Things seem to go smoothly enough and I switch back to the console. I type in ’emacs’ again and… there’s that clunking sound.

So I cruise over to the “Start Menu” thing and go to “More Applications” and “Editors” and there’s nothing over there about Emacs. This is weird… I figured the system would just know we had Emacs now…. I log out and log back in hoping that things would magically appear and it still doesn’t work. I start muttering under my breath and try everything I can think of to make it work. But I just can’t do it.

A Linux machine that can’t run Emacs. Pathetic! In exasperation I go to the PCLinuxOS site and register a sign-on name for their forums. I’m thinking, man… these dudes are going to “RTFM” me so bad…. It turns out that I have to wait for an administrator to activate me so I go back to trying to make it work on my own. (That red spot on the side of my cube? Oh, its nothing….)

I decide to go back and read the fine print on the packages… and obviously… I find out that I need more than the emacs library to run emacs. I need emacs-x11, too. So I install that puppy and… hey, we have emacs! Woo-hoo! (And it magically appears in the “Start Menu”, too, just like I expected….)

Now I need to get some CLisp cracking away in there. I use the Package Manager to get CLisp… pull up a Konsole and type Clisp to make sure its there. Sure enough, it’s hanukka again. There’s no Slime package, unfortunately. So I switch back to Firefox. (Did I mention that I had internet access completely painlessly? I hardly paid attention to the configuration questions on that when I was first booting up, but it just worked anyway. Nice.)

I google slime, download slime-2.0.tgz to the desktop, drag it over to the /home/guest folder, and then right-click “Extract Here” to unpack it. This works fine. Now I just need the file path to Clisp. Piece of cake, right?

Argh! Now I end up bloodying up the other side of my cubical…. I try a couple of grep’s from the Konsole… I do a half dozen searches from “Start | Find Files…” and nothing works. Why is looking up a file so difficult?!

I fire up Google for this one and come back with a “find -name clisp” command. I type this in from a root Konsole after going to the very bottom directory with a series of “cd ..” commands. Aha! There it is! Now I make new file with Emacs and cut and paste the following commands into it from the Slime readme file….

(add-to-list ‘load-path “/home/guest/slime-2.0/”) ; your SLIME directory
(setq inferior-lisp-program “/union/usr/bin/clisp”) ; your Lisp system
(require ‘slime)

I saved the text file as “setup.el” and loaded it with M-x load-file. After that I tried M-x slime… and we were ready to rock. Not quite ready for Lemonodor fame, but I’m glad to be here anyway.

And PCLinux 2007 does look pretty sharp, if I do say so myself. The GUI is very crisp, you (obviously) get native access to all the classic Unix commands, and you can switch between up to four different “desktops” at once to keep from shuffling windows so much. That last feature, combined with Firefox’s ability to keep multiple browser tabs in the same application instance, can cut back on a lot of clutter and make it very easy to get around.

(Emacs 22 appears to try to do a lame imitation of Notepad’s word wrapping by default! Don’t be fooled! I thought at first that the carriage returns would go away when I cut and pasted to other applications. Then I noticed that cutting and pasting between Emacs and other windows appeared to be altogether disabled! I could paste stuff to Emacs… but couldn’t get stuff out of it!? This just wasn’t a problem on Windows, strangely enough. I reluctantly switched to KWrite and used ctrl-J to clean up the carriage returns one paragraph at a time. This was way too big of a pain; there’s got to be an easier way to do this…. On the bright side, it appears that Firefox has a spell checker that automatically kicks in no matter where you’re typing stuff in. Nice!)


3 Responses to “Setting Up PCLinuxOS 2007 for Lisp Hacking”

  1. Zach Beane Says:

    If an executable runs when you just type “foo”, you can find its location by using “which foo”. No need to crawl the entire filesystem.

  2. lispy Says:

    I’m sure Ingvar Mattsson would cringe at such shameless inefficiency as well…. 🙂

    Thanks; I’ll use “which” next time.

  3. Liang Wang Says:

    (setq x-select-enable-clipboard t)
    into your dot emacs file.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: