Emacs unable to find devenv packages
I am really unsure if this is an issues of emacs or how devenv sets up packages. I am filing a ticket here because this is the first time I have actually had issues with it.
Essentially, I am starting a fresh project and using devenv init in order to start. I then enable languages.elixir, which supports the elixir_ls package. When I direnv allow, I get sent to a dev shell. I can then see that the elixir-ls binary and elixir packages are available. However when I use emacs to start editing the project, it cannot find the elixir-ls binary, and when I manually execute a shell command for elixir --version, I can see I am using my host elixir version instead of the newer version that was supplied by devenv.
I am really unsure of how to debug this kind of thing. But let me know what you need from me and I can do it.
Are you launching emacs from the developer environment?
I am not. I have emacs integrated with direnv. This has just worked in the past when using other tools such as numtide/devshell. But that uses use flake by default instead of a custom command. So my guess is it is somehow in how devenv is loading packages.
Do you have the repository public so I can try to reproduce?
https://github.com/ankhers/devenv-emacs
This is literally a brand new project
-
$ mix new foo -
$ devenv init - enable elixir language
@ankhers and then you run devenv shell and inside emacs?
I'm sorry, I forgot to include the .envrc file in that git repo. I just pushed it up. Direnv automatically calls devenv shell for me when I am in the shell and cd into the project.
Emacs I do not start within the devenv shell. I start emacs server globally with a systemd unit. I use the envrc emacs package to get direnv support.
When I open the previously linked project in emacs, I see that it is evaluating the .envrc file but then it fails to find the elixir-ls binary in my path.
If I open this project in emacs, it is able to find the package.
I just installed devenv 0.4, and this seems to have resolved itself.