
Emacs under Clojure - artagnon
https://github.com/hraberg/deuce
======
jimparkins
Just wanted to do a bit of cheerleading for this. Do not give up. I think this
will be an awesome open source project and a great project for people who are
learning Clojure and want a non web project outlet to actually build plugins
for. Also I am sure that people will raise LightTable in this thread as it is
written in Clojure and supports plugin development - but one size does not fit
all.

~~~
SoftwareMaven
I completely agree. And, who knows, maybe by being built in a more modern
world, it will be easier to extend in ways that solve similar problems to
LightTable.

------
hraberg
Author here. Thanks for the support everyone! Seems like there is an interest
in such a thing, so I'll better start hacking on this again.

There are two parts to this. First, pure learning and fun - even if it goes
nowhere. Second, "Extensible" is the keyword here. The goal is to find the
right balance between backwards compatibility (Emacs Lisp) and forward
extensibility (Clojure / JVM), so I'm not interested in writing a new text
editor from _scratch_.

I did consider Kickstarter (currently self funded), but felt I needed
something running first.

~~~
ArtB
Hmm, I'm confused by "the goal is to find the right balance between backwards
compatibility (Emacs Lisp) and forward extensibility (Clojure / JVM)". I
assumed the idea was to write emacs in Clojure and all the modules would be in
clojure so that it would entirely self-contained system with perhaps macros to
make porting from emacs-lisp easier. But now it sounds like you want to write
an emacs-lisp emulator in Clojure ?

~~~
hraberg
The Emacs Lisp emulator is necessary, otherwise it won't be Emacs. This part
will work similar to how shen.clj[1] works. This is itself an interesting
project, but as people have said, "why?"

Because new extensions can then be written in Clojure (or other JVM languages)
against the same core API (with shared concepts like "buffer" and "window").

Now the line of what's core and what's extension can be blurred, and while
keeping backwards compatibility, one can evolve the entire architecture in
Clojure, free from the constraints of the old Emacs code base.

But, easier said than done!

[1] <https://github.com/hraberg/shen.clj>

------
mcav
If this were a Kickstarter, I'd buy the top package. This is something I've
wanted for a long while. Good luck!

~~~
heretohelp
For anybody who codes in anything other than Clojure (although I have that
too), you can partake of a 40,000 LOC elisp dotfiles repo.

I have shake-n-bake modules for virtually any language or use-case you could
want.

<https://github.com/bitemyapp/dotfiles/tree/master/.emacs.d>

If you have any requests, I can probably bake it up. Included is the awesome
Ensime package for Scala and Shime (Slime) a repl for Haskell. See the link to
poke around for other things.

I recently restructured my dotfiles, but I once used my git repo to teach
people at a Clojure meetup in SF how to get rolling with Emacs + Slime + Swank
+ Clojure.

~~~
tadfisher
You'll have to restructure again now that package.el is standard and better.

~~~
heretohelp
I abhor package management in my Emacs. I am also avoiding Emacs 24 for now.

Yes, I'm serious.

~~~
tadfisher
It must be quite a chore to manually update all that elisp!

------
codemac
BT Templeton! Give us the guile-emacs[1]!

The only ports that are going to actually get emacs users are ones that can
eval elisp.

However, good luck with this! It's like Yi.. could turn out great, or could
turn out to just be a neat small project :)

[1]: [http://www.google-
melange.com/gsoc/proposal/review/google/gs...](http://www.google-
melange.com/gsoc/proposal/review/google/gsoc2012/bpt/23002)

------
alberich
I wonder if the guys that use emacs will really want to use another version of
it running on the JVM. I get this feeling that most of them despise the JVM,
and the guys who generally use JVM are eclipse/netbeans guys.

Sure there will be some people that don't fit in this category. Though, it
seems like the OP is trying to fix something that isn't broken. Anyways, it
will be a great learning experience.

~~~
tadfisher
You may be right, but those of us who currently use Emacs + SLIME for Clojure
work might flock to such an editor. A subset of a subset of Emacs users, for
sure, but not insignificant.

------
jlarocco
Is this a serious project meant for general use? If so, what problem is it
solving? What's the advantage over regular Emacs?

~~~
wes-exp
I'm curious too. I'm guessing the main draw is the ability to write extensions
and enhancements in Clojure rather than Emacs Lisp?

------
agentultra
tromey started a project to port Emacs to pure CL
(<http://tromey.com/blog/?p=709>). Why not help him out instead of dividing
the effort?

~~~
mhd
Didn't Erik Naggum try his hand at a CL/CLIM port years and years ago?

~~~
PuercoPop
Yeah, climacs. <http://common-lisp.net/project/climacs/>

By the way. Porting the C part is one thing but what to do about all the emacs
lisp packages? a compat mode?

~~~
agentultra
See <http://tromey.com/blog/?p=778> where he talks about some of the
difficulties.

tldr; Theoretically it should just work. There are some tricky bits.

------
cdi
Why not just write a similar editor, with same shortcuts, rewritten
modules/modes etc, but with new architecture and paradigms?

~~~
FuzzyDunlop
I think this is something that light table is in a better position to pull
off. It's new, doesn't have to worry about compatibility, and the worst case
is you have to configure it with javascript (if I recall correctly) and not a
lisp.

Whether or not it can, or even wants to, live up to that, is another matter
entirely. But it'd be great if it does.

~~~
slurgfest
Light Table isn't going to pull off the effect of this project, because an
editor which isn't compatible with emacs and isn't configured with lisp is a
completely different proposition from emacs.

I mean, if the Eclipse project started today, you could say similar things
about it. I am sure there exist emacs users who moved to Eclipse. But...

