Questions tagged [environment]

A set of dynamic variables that can affect the running processes.

68 questions
27
votes
2 answers

Using conda environments in emacs

What is the best way to use conda environmets using emacs as a Python IDE? I have got different conda environments while programming in Python: $ conda info -e # conda environments: # django /Users/Pablo/anaconda/envs/django scipy …
PabloRdrRbl
  • 435
  • 1
  • 4
  • 7
13
votes
3 answers

Reload environment variables

This question has been asked at superuser is-there-a-way-to-reload-environment-variables-in-emacs, but no good solution was given. I am using EmacsClient with often more than 30 buffers open, if I change an environment variable in the shell, I need…
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
11
votes
1 answer

How do I make tramp+eshell use my environment customized in the remote ~/.bash_profile

I have set up custom $PATH in my ~/.bash_profile on a remote machine (for programs installed user-locally by nix and cabal). I use eshell and tramp to issue commands on the remote machine (cd /remotehost:somedir; then commands). (I chose this method…
10
votes
4 answers

How to make shell-command run using shell profile and current directory hooks (ex. direnv)

I am trying to get shell-command and async-shell-command to integrate seamlessly with a couple of programs in my .bashrc file, specifically direnv in this example. I found that if I customized shell-command-switch, I could get shell processes to…
waymondo
  • 1,384
  • 11
  • 16
9
votes
3 answers

How to make terminal/shell spawned inside Emacs running on a Mac inherit the environment variables of the native terminal?

The terminal natively on Mac i.e. spawned through Spotlight or Launchpad, adopts the desired environment variables including the customization in ~/.bash_profile. But when I run Emacs (Emacs.app taken from Emacs For Mac OS X) and spawn shell inside…
8
votes
3 answers

Set environment variables for spawned subprocesses

I would like to set the environment variables for a spawned subprocess only. They are controlled by process-environment. The documentation says: binding that variable with let is also reasonable practice. In this example I try to unset HOME…
antonio
  • 1,762
  • 12
  • 24
7
votes
1 answer

Emacs can't find Node when Node was installed using NVM

I've got Node installed using NVM, and Emacs (v25.2.1) isn't able to find Node. When I run M-: (executable-find "node") I get back nil. However, when I run M-: (executable-find "cat") I get "/bin/cat". I assume the difference is due to my use of…
user2245766
  • 281
  • 2
  • 6
7
votes
1 answer

emacs command-line-default-directory variable is not set correctly

I'm using Emacs on Windows. I also have a VirtualBox VM that I connect to using plink. But then, when I use the eshell, and I do cd it tells me No such directory found via CDPATH environment variable even though I started the eshell…
Jenia Ivanov
  • 427
  • 4
  • 14
6
votes
1 answer

How to get the PATH from the SHELL

When launched at system start-up, the Emacs daemon doesn't pick up modifications to the PATH introduced by shell initialization scripts. Emacswiki suggests to use this function to update Emacs' PATH, (defun set-exec-path-from-shell-PATH () "Set up…
Arch Stanton
  • 1,525
  • 9
  • 22
6
votes
1 answer

How can I get buffer-local environment variables via .dir-locals?

I'm using emacs for many different projects. For some of them, I need, for example, different entries in $PATH, or different $MAKEFLAGS, whatever, you name it... I thought this would be possible somehow like this in .dir-locals: ((c++-mode …
Markus
  • 471
  • 2
  • 12
6
votes
2 answers

How do I use a remote virtual environment with emacs?

My particular setup is that my code lives on my machine and is mounted via vagrant onto a linux container upon which the virtual env lives. I'd like to be able to edit all the code, including the site-packages which live on the LXC seemlessly and…
David Boshton
  • 253
  • 2
  • 11
5
votes
1 answer

Why does emacs (getenv "TERM") return incorrect data?

I'm running Emacs 25.2.2 on Ubuntu 17.10. Although my environment has TERM=xterm-256color, (getenv "TERM") returns dumb, which is incorrect. Why does (getenv "TERM") return an incorrect value?
TheGeeko61
  • 145
  • 7
5
votes
2 answers

How can I get some environment variables into init.el to construct file paths?

I want to synchronize my emacs configuration through an identical init.el but needs some settings defined according to the host. For instance although init.el will be the same custom-file will vary by account and host, but will still have to be in…
vfclists
  • 1,347
  • 1
  • 11
  • 28
5
votes
2 answers

What kind of environment variables does Emacs expect to find in .profile, .bash_profile etc?

When I startup spacemacs I get the following message: You appear to be setting environment variables ("PATH") in your .bashrc or .zshrc: those files are only read by interactive shells, so you should instead set environment variables in startup…
vfclists
  • 1,347
  • 1
  • 11
  • 28
5
votes
2 answers

How to determine the initial current directory when emacs is run from command line?

How can I determine (from within Emacs) the current directory as it was when the Shell launched emacs from the command line?
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
1
2 3 4 5