From: "James K. Lowden" <jklowden@speakeasy.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Hook for Environment Activation?
Date: Wed, 9 Nov 2016 13:19:50 -0500 [thread overview]
Message-ID: <20161109131950.1ffc025a7b8a9998cb5251de@speakeasy.net> (raw)
In-Reply-To: 1db1e9d3-f035-4630-a26b-1a5748021f4f@googlegroups.com
On Tue, 8 Nov 2016 16:02:03 -0800 (PST)
Brandeis King <brandeis.a.king@gmail.com> wrote:
> I'm using Anaconda's environments to manage various python packages,
> including linters or "checkers" and I'm using Flycheck to perform
> code linting. When an environment is activated, I'd like to have
> Emacs respond to the activation by setting the Flycheck "checker"
> path.
I don't know the best answer to your question, but I can simplify it
for those unfamiliar with the particulars of Anaconda.
To "activate an environment" in conda is to change some environment
variables (and the prompt) to cause Python to use a different library
search path. It also may modify the PATH variable to change where the
Python interpreter is found. One common use is to let the user switch
between Python 2.x and 3.x interpreters.
Because changing an environment variable in the shell process
won't affect the environment in the emacs process, the question
becomes, What's the best way to send information to emacs?
As for a solution, my guess is that you're going to want to write a
shell function that wraps the "activate" command, and makes the
information available to emacs. If you run emacs as a daemon, you
could do that directly with emacslient. If not, you could produce an
artifact, and have emacs monitor it for changes.
--jkl
prev parent reply other threads:[~2016-11-09 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 0:02 Hook for Environment Activation? Brandeis King
2016-11-09 18:19 ` James K. Lowden [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161109131950.1ffc025a7b8a9998cb5251de@speakeasy.net \
--to=jklowden@speakeasy.net \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).