Emacs like editor in Elixir

Hi,

I’m exploring the idea of writing Emacs-like terminal editor in Elixir.

The base idea is to run mix run --no-halt and then use libraries like
https://github.com/ndreynolds/ratatouille to manage terminal window.

You could recompile/extend your editor on the fly by running r(Module)
or use the helper IEx.Helpers.recompile().

The issue I have is I’m getting compilation messages to the editor
window when I run recompilation. I think the source is from
Mix.Utils.compiling_n/2. Also, things like IO.inspect/1 will write
directly to STDOUT.

I would like to redefine that to make it write to a different place,
basically to some variable/gen server when I can view it later by
issuing a command from editor.

So, my questions is basically this:

  • is it possible to write Emacs in Elixir (in terms of live programming
    environment)

  • do I need to compile to a final app or it’s possible only when running in
    development mode, i.e. having tools like mix/iex/recompilation

  • should I write custom logging backend for Mix.shell().info/1, I
    don’t want to silence it with MIX_QUIET (but it looks like I’m still
    can’t silence compiling messages with this ENV variable)

Thank you

1 Like