all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Zhongwei Yao <ashi08104@gmail.com>
Cc: Bruno Barbier <brubar.cs@gmail.com>, help-gnu-emacs@gnu.org
Subject: Re: How to let tramp be aware the virtualenv?
Date: Wed, 17 Jul 2019 16:05:46 +0200	[thread overview]
Message-ID: <8736j4rc1x.fsf@gmx.de> (raw)
In-Reply-To: <CAJnfWeEmRm2XD23=S8oimF5fB2_cW6nqnF2U-HD+nFo+fs+9iA@mail.gmail.com> (Zhongwei Yao's message of "Wed, 17 Jul 2019 21:40:52 +0800")

Zhongwei Yao <ashi08104@gmail.com> writes:

Hi,

> 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).

Well, if you use connection-local variables, you could say to bash what
to do. Likely, you have defined something like

--8<---------------cut here---------------start------------->8---
     (connection-local-set-profile-variables
       'remote-bash
       '((explicit-shell-file-name . "/bin/bash")
         (explicit-bash-args . ("-i"))))
--8<---------------cut here---------------end--------------->8---

(taken from the manual). But if you add the "-l" arg, bash is a login
shell, and reads .bashrc. Like this (untested):

--8<---------------cut here---------------start------------->8---
     (connection-local-set-profile-variables
       'remote-bash
       '((explicit-shell-file-name . "/bin/bash")
         (explicit-bash-args . ("-i" "-l"))))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.



  reply	other threads:[~2019-07-17 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 10:30 How to let tramp be aware the virtualenv? Zhongwei Yao
2019-07-16 13:48 ` Michael Albinus
2019-07-16 19:22 ` Bruno Barbier
2019-07-17  2:02   ` Zhongwei Yao
2019-07-17  6:12     ` Michael Albinus
2019-07-17 10:47       ` Zhongwei Yao
2019-07-17 11:34         ` Michael Albinus
2019-07-17 13:40           ` Zhongwei Yao
2019-07-17 14:05             ` Michael Albinus [this message]
2019-07-17 16:02             ` Yuri Khan
2019-07-17 21:02             ` Bruno Barbier
2019-07-18 13:21               ` Zhongwei Yao
2019-07-18 17:45                 ` Bruno Barbier
2019-07-19  1:04                   ` Zhongwei Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736j4rc1x.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=ashi08104@gmail.com \
    --cc=brubar.cs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.