[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to let tramp be aware the virtualenv?
From: |
Zhongwei Yao |
Subject: |
Re: How to let tramp be aware the virtualenv? |
Date: |
Wed, 17 Jul 2019 21:40:52 +0800 |
Thanks. I try emacs27 and using connection-local-set-profiles. And I can
run into bash in compile command. But running into bash is not my
objective. (I try to add source my/python/virtualenv/bin/activate to
bashrc, and it doesn't work. The bash run in non-interative shell and seems
doesn't read my bashrc).
I want to make the compilation under tramp know which python virtual env is
activate. Currently, I have a workaround by using the following compile
command:
. /path/to/the/virtual/env/activate && python --version
But it is in-convenient that each compile command needs a ". /xxx/activate"
prefix. I don't know whether there is a way to make the compile command
aware of which virtualenv is activate without using such prefix.
On Wed, Jul 17, 2019 at 7:34 PM Michael Albinus <michael.albinus@gmx.de>
wrote:
> Zhongwei Yao <ashi08104@gmail.com> writes:
>
> > Hi, Michael,
>
> Hi,
>
> > I try to set the remote-shell to /bin/bash, and from tramp log, there
> > is:
> > xx8:15.682748 tramp-get-connection-property (7) # remote-shell
> > /bin/bash
>
> Good.
>
> > And I notice there is log line like:
> > 38:15.720661 tramp-send-command (6) # cd
> > /home/user/projects/foo/build/ && exec <<'6xxa3a8f7393fxxx' env
> > PS1\=/ssh\:remote_machine\:/home/user/projects/foo/build/\ \#\$\
> > TERMCAP\= COLUMNS\=134 INSIDE_EMACS\=26.1\,compile /bin/sh
> > (
> > echo $BASH_VERSION
> > ) </dev/tty
> > 6xxa3a8f7393fxxx
> >
> > It is still using /bin/sh.
>
> This isn't any longer Tramp. *This* hard coded /bin/sh comes from the
> compile command.
>
> Apparently, you're using Emacs 26. In Emacs 27, compile can be
> configured to use connection local variables, which would overwrite
> this.
>
> Do you have a chance to run the development version of Emacs?
>
> Best regards, Michael.
>
- How to let tramp be aware the virtualenv?, Zhongwei Yao, 2019/07/16
- Re: How to let tramp be aware the virtualenv?, Michael Albinus, 2019/07/16
- Re: How to let tramp be aware the virtualenv?, Bruno Barbier, 2019/07/16
- Re: How to let tramp be aware the virtualenv?, Zhongwei Yao, 2019/07/16
- Re: How to let tramp be aware the virtualenv?, Michael Albinus, 2019/07/17
- Re: How to let tramp be aware the virtualenv?, Zhongwei Yao, 2019/07/17
- Re: How to let tramp be aware the virtualenv?, Michael Albinus, 2019/07/17
- Re: How to let tramp be aware the virtualenv?,
Zhongwei Yao <=
- Re: How to let tramp be aware the virtualenv?, Michael Albinus, 2019/07/17
- Re: How to let tramp be aware the virtualenv?, Yuri Khan, 2019/07/17
- Re: How to let tramp be aware the virtualenv?, Bruno Barbier, 2019/07/17
- Re: How to let tramp be aware the virtualenv?, Zhongwei Yao, 2019/07/18
- Re: How to let tramp be aware the virtualenv?, Bruno Barbier, 2019/07/18
- Re: How to let tramp be aware the virtualenv?, Zhongwei Yao, 2019/07/18