Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With vterm, Julia REPL does not recognize environment variables of the buffer #169

Open
rc-zb opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@rc-zb
Copy link

rc-zb commented Dec 12, 2024

Description

With the vterm backend, Julia REPL can't recognize the environment variables set per-buffer, like JULIA_PROJECT.

Reproduction

  1. Install Emacs-libvterm.
  2. Install julia-snail.
  3. Install envrc.el and set the env var JULIA_PROJECT via Direnv.
  4. Open a .jl file. The echo area shows that the env vars have been successfully set.
  5. Open an REPL with julia-snail.
  6. Press ] to see the project being a wrong one.
  7. Back to the normal REPL and enter ENV["JULIA_PROJECT"] to confirm the fact.

Workaround

Wrap julia-snail with inheritenv-add-advice from inheritenv, like this:

(inheritenv-add-advice 'julia-snail)

Possible solution

inheritenv provides a couple of tools for dealing with this
issue:

  1. Library authors can wrap code that plans to execute processes in
    temporary buffers with the inheritenv macro.
  2. Users can modify commands like shell-command-to-string using the
    inheritenv-add-advice macro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant