
Racket mode for GNU Emacs - kogir
https://github.com/greghendershott/racket-mode#racket-mode-for-gnu-emacs
======
mijoharas
First off I want to commend the author for making this. Secondly, while I
realise it says:

> If you've used other Lisps and Schemes before, you may prefer Geiser, which
> is very sophisticated.

I'd like to ask if there are any reasons to use this over Geiser? It's my
current choice for an emacs racket mode so I'd like to know if there are any
features in this which geiser is lacking.

~~~
brudgers
Racket-mode's author is Greg Henderschott, creator of Cakewalk. He's active
under the Racket tag on StackOverflow. Based on his comments there, Racket-
mode is primarily driven by his needs, and these aren't fully met by
Geiser...I think he has also used it as a way to learn more about Racket.

[https://en.m.wikipedia.org/wiki/Cakewalk_(company)](https://en.m.wikipedia.org/wiki/Cakewalk_\(company\))

------
ics
I see no mention of it in the readme, but one of the things I missed while
learning Racket was the ability to use images and media the way that you can
in DrRacket. It's a silly feature if you are actually experienced with either
tool, but when you're learning (especially with the beginner guides on
Racket's site) it sure would be nice if you could follow [almost] as you would
with DrRacket.

~~~
phaer
iirc, geiser supports images in a racket repl inside emacs.

~~~
ics
Looks to me like the repl will display images but you can't just embed an
image in the source code as in DrRacket. Any ideas?

~~~
gcr
I wrote (part of) the patch that lets geiser display images in the REPL. It's
only for interactive use: when a function returns a picture, Emacs displays
it. It's not part of the file.

The way Racket embeds images into your source code is actually somewhat
interesting. If a `.rkt` file includes a rich element (eg. image, table, GUI
structure, etc.) then the result file format is not strictly human-readable
anymore. Instead, the source code is stored in the homegrown 'WXME' format
which, while text-based, is not actually human-parsable anymore. That makes
source code diffs a pain.

Emacs could technically parse these files on load and write them on save, but
that might be a bit tricky. The Racket library that reads and writes this
format is documented at [http://docs.racket-
lang.org/gui/WXME_Decoding.html?q=wxme](http://docs.racket-
lang.org/gui/WXME_Decoding.html?q=wxme) .

~~~
greghendershott
Thanks to the head start provided by gcr, recently I added the equivalent of
geiser's support for images in the REPL, to racket-mode.

As for supporting WXME format files: Although that sounds very cool, I don't
think that's within the scope of what I want to attempt for racket-mode (or
have time to do) now.

p.s. The video of my demo at RacketCon was posted recently:
[https://www.youtube.com/watch?v=QWiteH8PARQ&list=LLoI3ip0MG_...](https://www.youtube.com/watch?v=QWiteH8PARQ&list=LLoI3ip0MG_BCk_KUpkxeejQ&index=1)

p.p.s. My "30 year old technology" comment was re the previous speaker. I am
definitely not begin derogatory about Emacs. :)

------
nemoniac
What a racket-mode for emacs could really use is support for images in Racket
files and for parsing the binary format thar DrRacket reverts to when a file
contains images.

------
mark_l_watson
This looks like a great first attempt at writing two Emacs major mode
packages. I am going to try it tomorrow.

