J3RN / inf-elixir

An Emacs plugin for interacting with an Elixir REPL
GNU General Public License v3.0
44 stars 10 forks source link

Add support for IEx's open command #11

Closed J3RN closed 3 years ago

J3RN commented 3 years ago

Allow an inf-elixir buffer to use IEx's open command, opening the term given in an Emacs buffer. This is currently done by setting the ELIXIR_EDITOR in the inf-elixir buffer, defaulting to emacsclient --no-wait +__LINE__ __FILE__.

The Downside

The problem with this approach is, essentially, emacsclient. In order for this to work correctly, the user must have emacsclient in their $PATH. Also, the fact that this functionality relies on an external program makes it rather hard to test. I really wanted a solution that used something like find-file under-the-hood, but I can't seem to find any way to do that.

In Conclusion

I'm going to leave this PR up for a couple of days to see if anyone has any ideas on how this could be more elegantly implemented.