Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [environment]

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

1
vote
1answer
32 views

Have shell inherit buffer local process-environment

I have made buffer local changes to `process-environment' using the technique described in How can I get buffer-local environment variables via .dir-locals. I then call shell from that buffer. If I ...
0
votes
1answer
45 views

How to check whether ImageMagick is setup correctly on macOS?

I installed emacs on macOS by brew cask install emacs. But the functionality of resizing images doesn't work as expected. So, how to check whether the emacs distribution is built with imagemagick ...
2
votes
1answer
85 views

emacs daemon and ssh agent forwarding

In order to use ssh agent forwarding with emacs in daemon mode, running on a remote server, I've come-up with the following. I have an alias for the client like so: alias emacsclient="update_agent;/...
5
votes
2answers
122 views

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 ...
0
votes
0answers
21 views

Emacs doesn't use macOS's /etc/launchd.conf env variables

Emacs doesn't use macOS's /etc/launchd.conf env variables. I have the following there: function addToPATH { case ":$PATH:" in *":$1:"*) :;; # already there *) PATH="$1:$PATH";; # ...
0
votes
1answer
236 views

How should I solve “no such directory” error at CDPATH with environmental variable on Windows 10 Emacs?

I have installed GNU Emacs on Windows 10. When I open it, I get an error. Warning (initialization): An error occured while loading 'c:/Users/[redacted]/AppData/Roaming/.emacs.d/init.el': error: No ...
1
vote
1answer
217 views

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?
1
vote
0answers
81 views

indent items in auctex

What I would like to achieve is a deeper indentation of lines in items in Auctex. \begin{itemize} \item This is what I would like to achieve. The beginning of the second line aligns with ...
2
votes
1answer
103 views

Interpolate environment variables in string

I am trying to write a function that will interpolate the enviroment variables stored in process-environment in a string. For example, if I have the string "This is $Foo and ${Bar}_none and '$skip'" ...
0
votes
1answer
77 views

ansi colors for bash process

I'm trying to get ansi colors from my bash process, but I can't get this to work. (setq shell-process-name "shell-process-name") (setq shell-process-buffer "*shell-process-buffer*") (defun open-...
3
votes
1answer
331 views

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 ...
1
vote
2answers
386 views

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 ...
4
votes
2answers
212 views

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 ...
5
votes
2answers
340 views

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?
0
votes
1answer
76 views

Garbage prepended to PATH

For some reason, some garbage is prepended to my PATH variable in emacs. Testing from eshell: (M+x eshell): ~/projects/rust/logentries-parser/src $ echo $PATH bash: cannot set terminal process group ...
0
votes
1answer
1k views

Package `exec-path-from-shell` isn't setting PATH variables from `.zshenv` on MacOS

I'm running a GUI Emacs compiled from the master git branch on MacOS El Capitan. I'm using the package exec-path-from-shell to set several environment variables I have configured in my ~/.zshenv file. ...
1
vote
0answers
206 views

load environment variables of virtual environment in emacs

What is the best way to load in emacs the environment variables of a virtualenv? I seem to have got virtualenvwrapper.el working. For example, after using venv-workon my_venv, then M-! printenv ...
3
votes
3answers
529 views

How can Emacs set an environment/shell variable in a subordinate shell?

I often use subordinate shells within Emacs. (I instantiate these shells with M-x shell.) I put all these shells under auto-save-mode (through my shell-mode-hook; see below). Is there some way that ...
0
votes
1answer
413 views

UnicodeEncodeError in inferior python under windows

I have recently started using emacs under Windows as my python IDE. I had some struggle getting python convinced that it was allowed to output UTF-8 to my terminal emulator (mintty does support ...
5
votes
1answer
243 views

How can I use 'emacsclient' as $PAGER in eshell with pipe? or any better PAGER which works well with eshell?

When I typed git diff in eshell, it has weird attribute such like print : in every single line, cannot scroll back, and so on. I think this is because the default eshell env PAGER is set as less, and ...
0
votes
0answers
59 views

Racer rewrites enviroment variable

I'm trying to configure racer-mode. It's require to set up variable that points to directory with Rust sources. Set enviroment variable (setenv "RUST_SRC_PATH" "d:/rust_src/rustc-1.6.0/src") Now (...
3
votes
1answer
68 views

Separate Environments for each emacsclient

I have a single emacs server that I use for all of my work. It is located on a machine that I ssh into from every location. My 'browse-url is set to run a bash script that ssh's into the machine I am ...
13
votes
1answer
5k views

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 ...
0
votes
1answer
32 views

Exports in compile command

I'm using the Anaconda distribution for Numpy, Ipython etc. and during the installation the following was added to my .bashrc: # added by Anaconda2 2.4.0 installer export PATH="/home/matthias/...
1
vote
1answer
753 views

Missing modules when debugging Python code in Emacs

For a number of reasons - the main one being that Emacs is amazing! - I am trying to do all my Python development at work in Emacs instead of Pycharm, which I was using previously. The one component ...
2
votes
1answer
1k views

How to activate python virtual environment in init file?

How would I activate a specific virtual environment in my init file? I know how to activate it manually, but I don't like to do it every time I start emacs. To activate it manually I used: pyvenv-...
7
votes
3answers
2k views

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 ...
4
votes
1answer
1k views

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 ...
6
votes
1answer
1k views

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 <some folder> it tells me No such directory found via CDPATH ...
6
votes
1answer
1k views

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 /...
7
votes
3answers
2k views

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 ...
9
votes
4answers
2k views

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