GithubHelp home page GithubHelp logo

Comments (6)

louisdecharson avatar louisdecharson commented on August 20, 2024

Having the same here ! Any news @hnisonoff ?

from conda.el.

louisdecharson avatar louisdecharson commented on August 20, 2024

I've tried to debug it and for some reason activate-command is not set after

(activate-command (if (eq system-type 'windows-nt
                                   '("activate")
                                   '("conda" "activate"))))

e.g.:

(message "activate command: %s" activate-command)

yields: activate-command: nil

I've ended up modifying the function conda-env-shell-init in conda.el as:

;;;###autoload
(defun conda-env-shell-init (process)
  "Activate the current env in a newly opened shell PROCESS."
  ;; TODO: maintain compatibility with an older Conda version. Do we
  ;; check the Conda version and cache it?
  ;; TODO: make sure the shell has been set up for `conda activate`!
  ;; Do we need to `eval' the conda activation script every time?
  (let* ((activate-command (if (eq system-type 'windows-nt
                                   '("activate")
                                   '("conda" "activate"))))
         (activate-command (if (not activate-command) '("conda" "activate") activate-command))
         (full-command (append activate-command `(,conda-env-current-name "\n")))
         (command-string (combine-and-quote-strings full-command)))
    (comint-send-string process command-string)
    ))

from conda.el.

necaris avatar necaris commented on August 20, 2024

from conda.el.

louisdecharson avatar louisdecharson commented on August 20, 2024

Hi @necaris,
To me your code should work just fine, ie:

((activate-command (if (eq system-type 'windows-nt
                                   '("activate")
                                   '("conda" "activate"))))

I don't understand why it does not.
So I am happy to submit a PR but I feel my solution is more a plaster than anything else and a more appealing solution would fix the let activate-command part.

UPDATE: understood the issue in above code and submitted a PR to fix it

from conda.el.

louisdecharson avatar louisdecharson commented on August 20, 2024

Ok got the issue, it's was a simple parenthesis problem, I've submitted a PR to fix it:
#95

from conda.el.

necaris avatar necaris commented on August 20, 2024

Closing as fixed by #95

from conda.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.