Distilling the Essence of Emacs

Updates

Distilling the Essence of Emacs

As you may have already suspected, Emacs is probably the most hackable and customizable program that has ever existed. But how does it accomplish that?

Today I’d like to spend some time discussing the unique aspects of Emacs that enable this ultimate hackability so that we can basically produce a blueprint for other programs that might hope to replicate what Emacs has accomplished.

What I really want is to get your ideas and feedback here so that I don’t miss anything!

The purpose for discussing this is that I would really like to experiment with building Emacs-like applications for other use cases. We’ll be looking into this on the Flux Harmonic channel when I start producing videos there again.

User Interface

  • The text-focused interface
  • Defining user-facing actions as commands
  • The flexibility of the minibuffer
  • Theming and visual customization with faces
  • Window and frame management
  • Mode line (you can put whatever you want in there)

Question: could a more graphical representation still be as effective or hackable?

(How does Blender accomplish UI extensibility?)

Key Bindings

  • Prefix key system
  • Binding keys directly to commands
  • Ability to totally change input style (evil-mode, etc)
  • Mode maps

Question: does a program need such extensive ability to control key bindings to be considered hackable?

Extension Language

What are the unique aspects of Emacs Lisp that make it especially effective as a configuration language?

  • Lack of module namespaces
  • Simplicity of libraries
  • Hooks as a core extensibility point
  • You can hook/hack any function with advice
  • You can redefine any function no matter where it’s defined (as long as it wasn’t a C function)
  • Core program behavior (buffers, windows, frames) represented as first class objects
  • Major and minor modes
  • Self-documenting and source is easily accessible
  • You can inspect any variable or function at any time
  • Easy to pull in community-authored packages

Question: could you still achieve the same hackability with a better language?

  • Having a clear documentation/manual strategy that isn’t hard to keep up to date is critical for a hackable application

What else? What could be improved?

Anything major that we’re missing from the previous items?

  • The fact that you can re-evaluate code and extend Emacs while the program is running!

What could be done better?

  • The way you manipulate buffers is not very convenient (especially when you need to have a more structured representation of data)
  • Emacs was designed in a totally different era, lots of legacy design decisions
  • Asychrony should be easier to manage (not so in Emacs Lisp) - but how do you deal with the inevitable concurrency issues
  • Being able to make use of modern computing resources (more memory, more cores)
  • Immutable data types?
Subscribe to the System Crafters Newsletter!
Stay up to date with the latest System Crafters news and updates! Read the Newsletter page for more information.
Name (optional)
Email Address