20

I'm learning Emacs Lisp and I came across this decade old post saying that at some point Guile (Scheme) will replace Emacs Lisp, or Emacs will be rewritten with Guile.

https://web.archive.org/web/20081201143448/http://sanpietro.red-bean.com/guile/guile/old/3114.html

I was wondering if this is still a possibility, and if developers should be trying to write Elisp with this in mind? The original goal was for Guile to be backwards compatible with Elisp, but it seems like developing Scheme is the better choice.

Wilfred Hughes
  • 29,846
  • 15
  • 139
  • 192

6 Answers6

9

It should be possible after Guile 2.0 is released to use Guile with Emacs. The current pre-release supports ecmascript as well as scheme and there is apparently an elisp branch also but I haven't looked into it. Once Guile fully supports elisp it shouldn't be too hard to replace the current elisp interpreter with Guile. The real question is whether or not people are going to rewrite their customizations and add-ons in scheme or just continue to use elisp. Regardless, Guile 2.0 should make the possibility of a Guile Emacs much closer to reality than any other development in the past 10 years.

Chris
  • 139
  • 2
9

Guile 2.0.0 (released 2011-02-06) supports Emacs Lisp.

You can switch at the repl like so:

 scheme@(guile-user)> ,language elisp
 Happy hacking with Emacs Lisp!  To switch back, type `,L scheme'.
 elisp@(guile-user)> (eq 1 2)
 $1 = #nil

As to if/when someone is going to do some surgery on Emacs to extract elisp and drop in Guile-in-elisp-mode: the Guile 2.0.2 reference manual suggests this is the plan but it's not ready yet:

We hope that eventually Guile's implementation of Elisp will be good enough to replace Emacs' own implementation of Elisp.

Matt Curtis
  • 23,168
  • 8
  • 60
  • 63
8

guile and emacs, again - updated Emacs src, using non-hacked Guile, 23 Aug 2009

PS: I was noticing recently that my first commit to the Emacs source tree relating to this project was on 1999-08-28, just shy of ten years ago. I'm not sure if I should celebrate or be depressed on Friday.

http://lists.gnu.org/archive/html/guile-devel/2009-08/msg00163.html

elmarco
  • 31,633
  • 21
  • 64
  • 68
  • 1
    I see there was a Google Summer of Code project to make Guile handle elisp: http://code.google.com/p/google-summer-of-code-2009-gnu/downloads/detail?name=Daniel_Kraft.tar.bz2&can=2&q= –  Nov 03 '09 at 10:20
  • 1
    In 2012 there is going to be another GSoC related to Guile-Emacs interaction - http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/bpt/23002 – Mirzhan Irkegulov May 04 '12 at 06:56
  • 3
    As of August 2014 the integration is almost complete save for edge-cases, thanks to another GSoC - http://www.emacswiki.org/emacs/GuileEmacs – Michael Paulukonis Aug 21 '14 at 12:51
4

There have been some interesting discussions on this topic in recent times:

phils
  • 71,335
  • 11
  • 153
  • 198
2

I wouldn't worry too much about it. There are a couple of projects to use Guile with Emacs, but I sense that they're not mainline supported. As one of the developers of one of the projects observed, no one will switch unless all their existing elisp runs flawlessly in the new engine, which is a pretty tall task.

Not that it will never happen, it's just been 'in the clouds' for a few years.

Don Wakefield
  • 8,693
  • 3
  • 36
  • 54
  • 1
    A few years? Sounds like it's making the Perl 6 project look good. :-) If you have any current info, please post. It would be nice to learn more. –  Nov 03 '09 at 03:18
  • 1
    I'm just an interested bystander, been watching on and off for years now. As @elmarco's post and ensuing comments illustrate, there are a few active efforts. It's just hard to tell if any of them are going to hit the finish line. – Don Wakefield Nov 03 '09 at 14:49
2

Using a VM like parrot seems more interesting for the future than Guile as Parrot VM can handle many different dynamic languages and each language can reuse what has been developed in another language.

The work left to be done is :

  • adding emacs low-level concepts and functions to Parrot VM (basic elisp types like the buffer type, window, frame...)
  • creating an elisp language port to Parrot VM.

With such functionalities you could have all legacy elisp code running on Parrot VM without any porting issues, and new code could be developed and reused by any language supported by Parrot VM.

Jérôme Radix
  • 10,285
  • 4
  • 34
  • 40