emacs.d/clones/lisp/www.cliki.net/cl-emacs.html
2022-10-07 15:47:14 +02:00

123 lines
No EOL
11 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: CL-Emacs</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=CL-Emacs">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - CL-Emacs</span>
<div id="content"><div id="content-area"><div id="article-title">CL-Emacs</div><div id="article">Various people have proposed an <a href="emacs.html" class="category">emacs</a>-like editor written in Common
Lisp. This page collects together a few possibilities<p><h2>Editors and code</h2>
<ul><p><li> <a href="Lem.html" class="internal">Lem</a> (active as of 2022). An editor that works out of the box for Common Lisp but also for more languages thanks to its LSP mode (Python, Rust, Go, Java, Dart, Nim, HTML… with also a directory, markdown, SQL, shell… mode). It works on the terminal and in an experimental Electron front-end. More are in the works. It lacks docstrings and documentation, but its gitter chat is somewhat active and different people showed interest in helping. It has a Vim layer.<p>GitHub: <a href="https://github.com/lem-project/lem/">https://github.com/lem-project/lem/</a>.<p>It is an easy to install CL editor and REPL, so it's worth checking out.<p><img width="800px" src="https://lispcookbook.github.io/cl-cookbook/assets/lem-terminal.png">
</li><p><li> <a href="LispWorks.html" class="internal">LispWorks</a> is a proprietary implementation that comes with its own full-fledged, GUI editor, originally based on Hemlock. <p>You can find a review of the LispWorks editor on the Common Lisp Cookbook: <a href="https://lispcookbook.github.io/cl-cookbook/lispworks.html">https://lispcookbook.github.io/cl-cookbook/lispworks.html</a>.<p><img src="https://lispcookbook.github.io/cl-cookbook/assets/lispworks/two-sided-view.png" alt="The LispWorks editor, showing a Lisp REPL with autocompletion on the left, and Lisp code on a side panel on the right" width="1200px"><p></li><p><li> <a href="Climacs.html" class="internal">Climacs</a> is an implementation of the Emacs text editor in Common Lisp with some very interesting features, like incremental re-parsing of the buffer according to syntax rules and automatic indentation of lisp code. At the moment, it is also the most actively developed of the cl-emacsen on this page. Climacs is based on the same philosophy of dividing functions and user commands as Hemlock.<p></li>
<li>
<a href="Hemlock.html" class="internal">Hemlock</a> is an emacslike editor that comes with CMUCL, using
<a href="CLX.html" class="internal">CLX</a>. Some things are different from modern (X)Emacs, and said to be
more akin to older Emacsen. A lot is similar, though. The major
difference that users will first note is that M-x commands are
"Ordinary English Words" rather than
"hyphenated-lowercase-lisp-function-names". This has a lot to do with
how commands are implemented as something separate from 'interactive
functions' (ie, functions which call the interactive macro to add
themselves to the list of available commands). The ZWEI/Hemlock
design is actually much cleaner and clearly separates functions from
user commands. To the user, the difference is that they no longer
have to remember arbitrary function names, but instead just remember
ordinary 'names' for operations. As far as keybindings go most of the
ordinary Emacs bindings (movement, simple editing) are the same, but
more complicated commands (like code reformatting) are going to be
different.<p></li>
<li>
<a href="Portable&#32;Hemlock.html" class="internal">Portable Hemlock</a> (phemlock) is a fork of Hemlock that's
intended to run on any ANSI CL that has CLX. Also includes an elisp
emulation package from Ingvar Mattsson: note that this is not the
same as the CLOCC package below<p></li>
<li>Goatee is the text editing component for <a href="McCLIM.html" class="internal">McCLIM</a>. There's an
overlap between McCLIM and phemlock developers, so it's not impossible
that Phemlock will become <a href="CLIM.html" class="internal">CLIM</a>-based and combine with <a href="Goatee.html" class="internal">Goatee</a><p></li>
<li> <a href="CLOCC.html" class="internal">CLOCC</a> contains a package
(<a href="http://clocc.hg.sourceforge.net/hgweb/clocc/clocc/file/tip/src/cllib/elisp.lisp">elisp.lisp</a>)
that implements some part of elisp in CL.<p></li>
<li> <a href="http://web.archive.org/web/20070920191914/http://www.emmett.ca/~sabetts">LiCE</a> (<a href="https://repo.or.cz/w/lice.git">repository on repo.or.cz</a>)
shows beginnings of another CL-based Emacs which can also run atop of
<a href="Movitz.html" class="internal">Movitz</a>. <p></li>
<li> CEDAR<p>At <a href="https://emacsconf.org/2021/talks/build/">EmacsConf 2021</a>, Fermin MF presented CEDAR as an Emacs developed in Common Lisp.<p>Repository: <a href="https://gitlab.com/sasanidas/cedar">https://gitlab.com/sasanidas/cedar</a><p>Description in repository: "CEDAR is an advance interactive development environment aiming to be Emacs compatible with all the features that come with it."
</li>
</ul><p><h2>(Perceived) problems with the existing GNU Emacs</h2><p>The primary problem with GNU Emacs is that Emacs Lisp is simply not great compared to Common Lisp.<p><ul>
<li> Single-threaded
</li>
<li> Slow GC
</li>
<li> Characters implemented as integers
</li>
<li> Dynamic scope everywhere (while conceding that it's essential to have
in <i>some</i> places)
</li>
</ul><p><h2> Design ideas </h2>
<ul>
<li> Craig Finseth's book, <a href="http://www.finseth.com/craft/">The Craft of Text
Editing</a>, available in HTML form online. "Required reading about
the implementation of Emacs-type text editors."<p></li>
<li>If you're looking for a starting point for a new Emacs design you might like to take a look at Deuce, an Emacs like editor written in the Dylan programming language. Dylan has a CLOS style object model and it shouldn't be too difficult to port Deuce to Common Lisp. It separates GUI from editor code and has other interesting features. For details, see Scott Mckay's <a href="https://groups.google.com/g/comp.lang.dylan/c/3uuUb3Z9pAc/m/6NbE9gYpeAIJ">post</a> (he is the author of Deuce). The source code to Deuce is available from <a href="https://github.com/dylan-lang/opendylan/tree/master/sources/deuce">https://github.com/dylan-lang/opendylan/tree/master/sources/deuce</a>. Features:<p><ul>
<li>Lines are polymorphic. They can contain text, graphics, etc.</li>
<li>There is the concept of 'Source containers' and 'source sections'. A buffer is composed of 'source sections' which can come from different contains. In a nutshell this means you can have a single buffer where different parts of that buffer come from different files. For example, Deuce uses this to display a single buffer containing all the methods for a generic function. Each method definition in the buffer comes from a different source file. Editing that section of the buffer edits the original file.</li>
<li>The capability for graphics is included.</li>
<li>A simple presentation framework is part of the design. Allowing 'live' objects in the editor.</li>
<li>GUI presentation is separated from editor functionality allowing different GUI back ends to be used</li>
</ul><p>
</li>
<li>An interesting approach for a "CL-Emacs" would be for Emacs to be implemented as a set of processes, some being "display engines," others being loosely characterized as "buffer engines." Supposing Gnus had its own process, it might even block, and not slow down the other things going on. Erik Naggum had similar <a href="https://groups.google.com/g/comp.lang.lisp/c/Dq52-8B3Vk4/m/aMawHIHirDEJ">ideas</a>.<p></li>
<li> Kent Pitman describes some interesting features of Zmacs, the
Lisp machine editor <a href="https://groups.google.com/g/comp.lang.lisp/c/XpvUwF2xKbk/m/Xz4Mww0ZwLIJ">here</a>.<p></li>
<li> <a href="http://massemanet.github.io/distel/">Distel</a> ("distributed emacs lisp"), an extension of Emacs Lisp with the Erlang language's essential concurrency constructs, plus a (fully non-blocking) implementation of Erlang's inter-node distribution protocol. Also <a href="https://github.com/rhaberkorn/ermacs">Ermacs</a>, a fully concurrent Emacs written in Erlang (both core and extensions).<p></li>
</ul><p><h2>Other resources</h2><p><ul>
<li> The <a href="comp.lang.lisp.html" class="internal">comp.lang.lisp</a> thread that led to the creation of this page: <a href="https://groups.google.com/g/comp.lang.lisp/c/V7yiSIfLEis/m/sIhFE4M5yk4J">https://groups.google.com/g/comp.lang.lisp/c/V7yiSIfLEis/m/sIhFE4M5yk4J</a><p></li>
<li> There is a (mostly dormant) mailing list for discussing CL-Emacs. Details on the list are available at <strike>http://lists.unlambda.com/mailman/listinfo/cl-emacs</strike>.<p></li>
<li>
<a href="http://www.gnu.org/software/emacs/emacs-paper.html">emacs paper</a><p></li>
<li>
<a href="http://www.lisp.se/emacs-cl/">Emacs Common Lisp</a> - the other way around. CL implemented in Emacs Lisp.
</li>
</ul></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="CL-Emacs.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=CL-Emacs">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=CL-Emacs">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=CL-Emacs&amp;from-revision=3873721343">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>