necaris / conda.el

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

Add conda-config (similar to elpy-config) command to re-evaluate cached values #134

Open epruesse opened 1 year ago

epruesse commented 1 year ago

conda--config caches the parsed output of conda config --show --json. If that's wrong the first time round, there are constant weird error messages.

In my case, I was getting Wrong type argument: arrayp, nil on all conda-* functions called. Turns out conda--config contained (json-parse-error "invalid token near 'sh'" "<string>" 1 2 2). It took forever to realize was actually the cached value, not a current error...

Perhaps having conda-config similar to elpy-config to re-load and show the (cached) configuration would be a not-too-complex fix to this and similar issues?

necaris commented 1 year ago

That's definitely an interesting thought!

necaris commented 1 year ago

Does #136 look like it'll do the trick?