Questions tagged [environment]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

Use ssh-agent's SSH_AUTH_SOCK value, not macOS' one [duplicate]

When I run (getenv "SSH_AUTH_SOCK"), I get "/private/tmp/com.apple.launchd.K9OEFgxDgw/Listeners". I want to set it to the value that is returned by echo $SSH_AUTH_SOCK on the command line which is ...
1
vote
0answers
35 views

Storing and Loading Non-Static/Multiple Configs

I'm writing an emacs wrapper to a set of scripts that require a lot of config settings to run. These can be variously environment variables, command line parameters and so forth. They should be user ...
0
votes
1answer
115 views

How can I get files and links to open correctly in emacs?

This used to work, but since a recent update, it hasn't. I'm using spacemacs, with this configuration. Links and files don't open as usual. If I open ansi-term, and type xdg-open test.txt, then I see: ...
1
vote
1answer
96 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
373 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
233 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
327 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 ...
1
vote
0answers
44 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
415 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
450 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
105 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
200 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
165 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
571 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 ...
2
votes
2answers
685 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
367 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
583 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
104 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 ...
1
vote
1answer
2k 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
293 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 ...
2
votes
3answers
702 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
480 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 ...
4
votes
1answer
265 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 ...
2
votes
1answer
76 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 ...
21
votes
1answer
7k 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
39 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
914 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
2k 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 ...
5
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 ...
7
votes
1answer
2k 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 /...
9
votes
3answers
3k 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-...