[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] conda doesn't work in ob-shell sessions
From: |
Matt |
Subject: |
Re: [BUG] conda doesn't work in ob-shell sessions |
Date: |
Thu, 25 Jan 2024 20:14:47 +0100 |
User-agent: |
Zoho Mail |
---- On Wed, 24 Jan 2024 16:20:16 +0100 Ihor Radchenko wrote ---
> Jack Kamm jackkamm@tatersworld.org> writes:
>
> > Ihor Radchenko yantar92@posteo.net> writes:
> >
> >> What about the attached patch?
> >
> > I applied the patch to main, but the behavior was the same as before.
>
> What about the attached second version of the patch?
I spent way too long trying to test it but I'm not sure I applied the patch
correctly.
I did the following, then realized that the patch I applied undid changes (I
assume) from a previous patch and so it must have been applied on top of
another one. I then wasted a bunch of time trying to apply various
combinations of the four patches I found in the thread. One of the patches has
trailing whitespace yet the various --ignore options of git am didn't seem to
ignore it. I guess I could have looked at the timestamps and used git apply in
sequence?
Should make autoloads also be run after applying the patches?
Here's what I was able to do:
In a VM, installed conda as described by their page. Specifically, my .bashrc
was modified to activate the base environment. Closed terminal, opened it
into the base environment, and created a new environment, emacs-test.
Downloaded the latest org-mode by git-clone and did make autoloads. Added the
org-mode git repo's lisp directory to my early-init.el.
Applied patch with
git apply --cache --ignore-space-changes --ignore-whitespace
2-v2-0001-lisp-ob-comint.el-Introduce-a-fallback-prompt-reg.patch
Doing plain git apply failed.
With the changes in the org-mode index, the base environment activated, I run
'emacs' and confirm I'm using the org-mode git with the patch applied (ob-shell
doesn't set org-babel-comint-prompt in ).
Then
(org-babel-do-load-languages 'org-babel-load-languages '((shell . t)))
#+begin_src shell :results output :session *shell*
conda activate emacs-test
#+end_src
It hangs. C-g and switch to shell buffer shows the following (note, this was
typed in and not copy-pasted because VM):
(base) user@debian:~$ PROMPT_COMMAND=;PS1="org_babel_sh_prompt> ";PS2=
org_babel_sh_prompt> conda activate emacs-test
echo 'org_babel_sh_eoe'
(emacs-test) org_babel_sh_prompt> 'org_babel_sh_eoe'
(emacs-test) org_babel_sh_prompt>
--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode
Re: [BUG] conda doesn't work in ob-shell sessions, Suhail Singh, 2024/01/23