necaris / conda.el

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

Error: `(void-function working-dir)` #146

Open quzyte opened 1 year ago

quzyte commented 1 year ago

Recently updated my packages, and since then every time I open a new file (including start-up), I get this error. Debugging showed the source of the error to be conda.el.

Debugger entered--Lisp error: (void-function working-dir)
  working-dir("/home/user1/org/main-doc.org")
  conda--infer-env-from-buffer()
  conda-env-activate-for-buffer()
  conda--switch-buffer-auto-activate(#<buffer main-doc.org>)
  apply(conda--switch-buffer-auto-activate #<buffer main-doc.org>)
  switch-to-buffer(#<buffer main-doc.org>)
  #<subr command-line-1>(("main-doc.org"))
  apply(#<subr command-line-1> ("main-doc.org"))
  command-line-1(("main-doc.org"))
  command-line()
  normal-top-level()

Further, on looking through the commit history, it seems like the reference to working-dir is introduced in #140.

I couldn't find any documentation about the function (working-dir) either.

PS. I use Doom Emacs (Emacs 28.2).

necaris commented 1 year ago

@quzyte could you confirm which version of Doom you're using? It appears that as of current main Doom is using a previous commit that doesn't have the fix. You can fix this by adding this to your ~/.config/doom/packages.el:

(package! conda :pin "f90598f54af78469e61497560ddad05344810a35")

I have also put in a PR upstream so you could also wait for that to be merged, if it is merged.

quzyte commented 1 year ago

Thanks! Being sleep deprived, I hadn't checked if it was fixed already. Pinning to commit works with no more errors. Guess I'll have to keep it pinned until it's updated in Doom.