

Taking it to Th’emacs - allard
http://gbracha.blogspot.com/2014/08/taking-it-to-themacs.html

======
agentultra
There are WebKit integrations in Emacs available [0]. The beauty of emacs is
that it's actually programming language kernel that has a text editor built
in. You can extend Emacs far beyond text.

[0]
[http://www.emacswiki.org/emacs/WebKit](http://www.emacswiki.org/emacs/WebKit)

~~~
rthomas6
This makes me wonder if it would be a good idea to make an emacs clone with
another language, say, Scheme or Lua? Or Haskell?

Edit: ah, it looks like it's been done for Scheme:
[http://www.emacswiki.org/emacs/GuileEmacs](http://www.emacswiki.org/emacs/GuileEmacs)

------
hollerith
_Emacs has built-in scripting language. . . . All of the editor’s
functionality is exposed via APIs written in the scripting language.

As a consequence, you can control everything emacs does programmatically. This
makes emacs extensible in a way that is far deeper and more powerful than a
plug-in architecture. A plug-in architecture must anticipate every desired
extension to the system. Since it never can, it always disappoints in the end.
Along the way it grows ever more complex and bloated in its futile attempt to
foresee every possible need. With a language, you can code any extension you
need._

Does anyone who has tried to modify both Emacs and an editor (or IDE) with a
plug-in architecture agree or disagree with that?

~~~
troels
Sort of depends on what is meant by a plug-in architecture. I think it's
begging the question a bit.

I can compare writing extensions to Firefox and extensions to Emacs and it's
pretty much the same experience, if that helps?

~~~
hollerith
>depends on what is meant by a plug-in architecture.

I'll give examples.

I love how easy it is to change or customize Emacs. E.g., if I want to change
what happens when I right click on some text, I can do so (and _have done_ so)
by writing some Emacs Lisp code (and only 27 lines of Emacs Lisp code at that)
-- leaving the parts of Emacs written in C completely untouched.

In other words, in Emacs (and IIUC Light Table), with very few exceptions,
_all_ of the editor’s functionality is exposed via "APIs" (and in Emacs, it
would be accurate to replace "APIs" with "variables and functions" since Emacs
does not have classes and such) written in a high-level scripting language
(Emacs Lisp or ClojureScript).

The same cannot be said of Textmate, Sublime Text or Lime Text. What one can
say of those three, though, is that they all have a plug-in architecture.

So, my question, again, is whether the OP is correct in his assertion that --
at least for people who are in the habit of frequently changing many different
aspects of their editor -- having a plug-in architecture is no substitute for
having virtually all of the editor's functionality exposed via "APIs" written
in a high-level language.

~~~
girvo
Interestingly, once you enable the developer tools, Komodo is very similar to
what you're describing. Pretty much everything is exposed as an API to the
JavaScript environment, you can change stuff on the fly and the like. It also
has a Python API for certain features. I think that's a consequence of being
based on XUL, a web browser is similar to emacs in terms of runtime
extensibility, though not 100% of the way there.

------
taeric
Really seems that you can take emacs back to the core by just looking at the
origin of the name. Editor MACroS. Says it all right there, it isn't just a
text editor.

Indeed, the text editor portion is almost incidental. Emacs is a set of
programs that all operate with the text editor as the common environment.

This works remarkably well with things that communicate through text. Which
is, not unsurprisingly, a lot. Doesn't work as well for purely visual things.
Especially not those that are lacking a text representation.

~~~
yarrel
Emacs can display and edit vector graphics. I wrote a dedicated vector image
editor a while back ("Minara") in which the application, tools, and images
were all just Scheme code (using Guile).

I'm now wondering about representing and manipulating bitmap images in a
similar way to Emacs' vector handling. I think it could be fun and I don't see
any practical impediments. Just represent the image as a PPM-style text while
it's in Emacs then write it out as binary afterwards.

~~~
taeric
Oh, certainly. And you'll never get a lack of my preaching the gospel that is
org-mode. The inline latex/ditaa/graphviz/whatever manipulation is truly first
rate and borderline mind blowing.

The problem, I think, is when people refuse to think of the textual
representation as a reflection of the graphical one. Worse, we constantly
dream of many textual representations of the same visual thing. Consider the
constant wishing there was an AST based code editor, and then all of us that
point out how paredit is that editor.

More to the point, the more complicated your AST or other language, the more
difficult it can be to have meaningful semantics that are intuitive. What does
it mean to type into a graphics image? Go down? Etc?

------
one-more-minute
Check out Light Table. It has a really interesting architecture specifically
designed to support that kind of interactive scriptability / extensibility,
and the fact that it's written in a decent Lisp (Clojure) is the icing on the
cake. It's a joy to work with, because even when the internal code has
problems you can just patch it on the fly.

------
RichardFord
_Emacs is my preferred text editor. I don’t use old-fashioned text editors as
much as I used to, because I often need more specialized tools. I use IDEs for
various programming languages and other things when producing high quality
documents. And yet, I often wish I could subsume these with a tool that had
the basic goodness of emacs._

I love the ease of customization of Emacs and other text editors, but they're
just plain dumb when it comes to knowing programming languages.

~~~
taeric
Me thinks you haven't used emacs as much as "other text editors." There are
very few features that people "wish" emacs had, that it doesn't actually have.

Specifically, language recognition is not just regexes in emacs.

~~~
Cieplak
Perhaps this is not the right forum but does anyone know of a good emacs mode
for jump-to-definition in Python? I've used ctags and jedi but haven't been
able to configure anything as awesome as the Python plugin for IntelliJ (same
as PyCharm). To implement it, it would require a combination of static
analysis and on-the-fly interpretation, given Python's duck typing. If emacs
had this, I would use emacs all the time.

~~~
PuercoPop
I use jedi.el along with virtualenv-wrapper which does jump to definition
perfectly fine ime. But keep an eye for open sourcegraph's mode[0], they are
going incorporate python soon AFAIU.

[0]: [https://srclib.org/plugins/emacs/](https://srclib.org/plugins/emacs/)

~~~
beliu
One of the authors of srclib here. Python has been incorporated (and should be
installed if you update srclib and run the toolchain install script). The
website hasn't been updated to reflect this, however. Let us know if you run
into any issues!

