necaris / conda.el

Emacs helper library (and minor mode) to work with conda environments
MIT License
153 stars 49 forks source link

Env autoactivate doesn't work when using find-file #162

Open GrqPnegre opened 2 weeks ago

GrqPnegre commented 2 weeks ago

When conda-env-autoactivate-mode t and opening a file in a directory containing environment.yml for the first time, the conda environment is not activated.

It appears that conda--switch-buffer-auto-activate is not being called as part of find-file.

$ emacs --version
GNU Emacs 30.0.50
Development version a470dfb7f8a0 on master branch; build date 2024-01-30.
(pkg-info-package-version 'conda)
(20240708 2135)

Possible fix: Add conda--switch-buffer-auto-activate to find-file-hook.