[racket] Emacs, racket and OS X issues

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Jul 14 10:50:57 EDT 2011

9 hours ago, John Clements wrote:
> On Jul 13, 2011, at 8:19 PM, Lavoie Francis wrote:
> > I want to learn racket. I already started learning lisp from Land
> > of Lisp, Practical Common Lisp and a bit of Clojure.
> > 
> > For my everyday job (python, javascript) I use emacs, to learn
> > lisp and clojure I used emacs with slime. I would like to do the
> > same thing with racket but I ran into trouble, emacs can't find
> > racket.
> > 
> > First, it looks like emacs for OS X does not use the users' own
> > $PATH, but the one of the system. I tried some hack I found on
> > google
> > (http://olabini.com/blog/2009/12/path-problem-with-emacs-on-mac-os-x/,
> > http://www.emacswiki.org/emacs/EmacsApp#toc2) without luck, emacs
> > can't find racket.
> This one I can shed some light on.  If you start emacs (or any other
> program) from a shell (running in a terminal window), it inherits
> that shell's PATH.  If you start it from the finder, though, it
> doesn't. One way to fix this is to start emacs from a terminal
> window. Another is to try a hack such as the one you describe.
> Another one is to explicitly specify the path in the command that
> runs racket.

Given that confusion, and the fact that most people on OSX use the
finder to run things, the last option is probably the most convenient.
Note, however, that slime won't work with racket.

Another option is to put symlinks in whatever is in your Finder's
default $PATH.

> > So I tried to compile racket from source.

(That's definitely an overkill for solving a $PATH problem...)

> > I used the unix build to install racket into the standard path.
> >> ./configure --enable-mac64 --enable-xonx --prefix=/usr/local
> > It produced the following error message: --enable-mac64 and
> > --enable-xonx are not valid option; but everything runs well and
> > works! Great I can start to create some stuff.

They are definitely not compatible -- the first is for OSX
applications (whatever buzzword is used (cocoa?)), and the second is
for a unix build that uses the OSX X thing.

Also, note that by default -- without a `--prefix' flag, Racket builds
itself in place.  When that's done you can move the resulting
directory anywhere you want.  It's generally much more conveinent than

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.