Comments (4)
Hi @wtianyi.
Thanks, I believe you might be right. The problem I had with switch-to-buffer
was that after opening a file, I had to jump to another buffer and then back again for the conda-env-autoactivate-mode
to do its job.
But now that you brought it up, I did some testing and noticed that conda-current-name
gets the wrong value (with pop-to-buffer
) when jumping between buffers that use different conda envs. This seem to work better with switch-to-buffer
.
But what is the right solution to activating conda on the opening of a file?
As a workaround, I added conda-env-activate-for-buffer
to find-file-hook
:
(use-package conda
:hook
(find-file . conda-env-activate-for-buffer)
:config
(conda-env-initialize-eshell)
(conda-env-autoactivate-mode t)
:ensure t)
So maybe that commit should be reverted, neither solution seem perfect, but at least the problem with switch-to-buffer
can be worked around.
from conda.el.
Thanks for your detailed explanation and tests! @dwa
I do resonate with you on the problem that the environment is not auto-activated on the opening of a file, and I too don't have a satisfying solution.
I was thinking that maybe there is some way to make "conda.el" work with "projectile" so that the conda environment is consistent and set "per project". But I have not nearly enough knowledge about "projectile" to make any proposals.
Thanks for your workaround with find-file-hook
too!
from conda.el.
I'm closing the issue. Should I have a better idea about projectile I'll potentially open a new issue or pull request.
from conda.el.
Referring related open issues #29 #64 #81
from conda.el.
Related Issues (20)
- Error auto activating base env with custom conda home HOT 4
- conda-env-activate doesn't work but conda-env-list does HOT 6
- conda-env-name-to-dir errors HOT 3
- Error activating env HOT 16
- `conda-env-subdirectory` variable
- Add conda-config (similar to elpy-config) command to re-evaluate cached values HOT 2
- When python-shell-interpreter is set to "jupyter", conda is unable to change the environment of the interpreter. HOT 4
- Prefix is not added in shell prompt in Emacs 29.0.60 HOT 3
- Is there a reason not to get the user's config by default if it exists? HOT 4
- Activating environment when using 'emacs file.py'
- conda-env-activate-for-buffer sets PATH to "", causing "ls" "git" "bash" to fail HOT 9
- Error: `(void-function working-dir)` HOT 2
- Error when running the suggested config
- Eshell Python does not track environment HOT 2
- once conda-env-autoactivate-mode is called for one buffer, it activates for everyfile
- Auto Activate only for Python-mode
- Invalid version syntax HOT 5
- Add support for direct python invocation in the current environment
- Only .yml extension is recognised for activating environment
- conda.el, elpy, and python-mode conflicts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conda.el.