Giter Site home page Giter Site logo

Comments (21)

alypeng avatar alypeng commented on August 25, 2024 1

I had a similar problem but it turns out that fish was setting environment variables for every new shell (including non-login and non-interactive shells) so it appears that some values (notably PATH) from process-environment were being overwritten in the shell environment where the compilation runs.

I changed my startup file so that environment variables are set for login shells only and compile works as expected now.

# ~/.config/config.fish

# before
set -x PATH ...
...

# after
if status is-login
    set -x PATH ...
    ...
end

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

this is supposed to work already, and with direnv-mode this should even work transparently whenever you switch buffers.

please describe the exact problem, the output of the hidden *direnv* buffer (see readme), and the expected and actual behaviour.

from emacs-direnv.

cwdurst avatar cwdurst commented on August 25, 2024

OK, I thought there might be something else in my emacs config screwing it up, so I tried again from a blank ".emacs" file.

System: OSX 10.10.5 (Yosemite) [old, I know]
Emacs: GNU Emacs 25.1.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F1912)) of 2016-09-29

~/demo$ brew info direnv
direnv: stable 2.12.2 (bottled), HEAD
Load/unload environment variables based on $PWD
https://direnv.net/
/usr/local/Cellar/direnv/2.11.3 (8 files, 3.5MB)
  Poured from bottle on 2017-06-15 at 17:42:32
/usr/local/Cellar/direnv/2.12.2 (8 files, 3.6MB) *
  Poured from bottle on 2017-07-31 at 16:12:46
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/direnv.rb
==> Dependencies
Build: go ✘
~/demo$

(Note: I had to add "melpa" before "M-x package-install RET direnv RET" would work.)
The rest was added when I turned "direnv" on: "M-x direnv-mode RET".

File: .emacs

;; Add the MELPA (Milkypostman’s Emacs Lisp Package Archive)
(require 'package)
(add-to-list 'package-archives
  '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)

(direnv-mode)

File: ~/demo/.envrc
export THIS_IS_A_TEST_VARIABLE="this is a test value"

In a *shell* buffer:

~/demo$ cd .
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
~/demo$ direnv allow
direnv: loading .envrc
direnv: export +THIS_IS_A_TEST_VARIABLE
~/demo$ pwd; echo; env|egrep 'TEST|SHELL'; echo; direnv status
/Users/cdurst/demo

SHELL=/bin/bash
THIS_IS_A_TEST_VARIABLE=this is a test value

direnv exec path /usr/local/Cellar/direnv/2.12.2/bin/direnv
DIRENV_CONFIG /Users/cdurst/.config/direnv
DIRENV_BASH /bin/bash
Loaded RC path /Users/cdurst/demo/.envrc
Loaded watch: ".envrc" - 2017-08-01T12:06:33-04:00
Loaded watch: "../.config/direnv/allow/1af69f93f09313b301a114e9750c271c3d138cde699020dae201b12ab2af6c51" - 2017-08-01T12:06:39-04:00
Loaded RC allowed false
Loaded RC allowPath 
Found RC path /Users/cdurst/demo/.envrc
Found watch: ".envrc" - 2017-08-01T12:06:33-04:00
Found watch: "../.config/direnv/allow/1af69f93f09313b301a114e9750c271c3d138cde699020dae201b12ab2af6c51" - 2017-08-01T12:06:39-04:00
Found RC allowed true
Found RC allowPath /Users/cdurst/.config/direnv/allow/1af69f93f09313b301a114e9750c271c3d138cde699020dae201b12ab2af6c51
~/demo$

So far so good. Then I did the following command:
"M-x compile RET pwd; echo; env|egrep 'TEST|SHELL'; echo; direnv status RET
and this is what I got:

-*- mode: compilation; default-directory: "~/demo/" -*-
Compilation started at Tue Aug  1 13:31:27

pwd; echo; env|egrep 'TEST|SHELL'; echo; direnv status
/Users/cdurst/demo

SHELL=/bin/bash

direnv exec path /usr/local/Cellar/direnv/2.12.2/bin/direnv
DIRENV_CONFIG /Users/cdurst/.config/direnv
DIRENV_BASH /bin/bash
No .envrc loaded
Found RC path /Users/cdurst/demo/.envrc
Found watch: ".envrc" - 2017-08-01T12:06:33-04:00
Found watch: "../.config/direnv/allow/1af69f93f09313b301a114e9750c271c3d138cde699020dae201b12ab2af6c51" - 2017-08-01T12:06:39-04:00
Found RC allowed true
Found RC allowPath /Users/cdurst/.config/direnv/allow/1af69f93f09313b301a114e9750c271c3d138cde699020dae201b12ab2af6c51

Compilation finished at Tue Aug  1 13:31:27

I don't even see a *direnv* buffer getting created, and if I open one its mode changes from "Fundamental" to "Fundamental Compiling" when I do the compile, but it seems to remain empty.

I must be doing something totally wrong. I'm not sure I can see any effect from (direnv-mode).

Just to be sure, I did a "C-h v direnv-mode RET" and got this:

direnv-mode is a variable defined in ‘direnv.el’.
Its value is t
Original value was nil
...

So I know that it is there and turned on.

What am I missing?

from emacs-direnv.

cwdurst avatar cwdurst commented on August 25, 2024

Oops, I was probably missing the bit about it backing off when an error occurred. When I get a chance, I'll try again and see if "direnv-update-environment" fixes it.

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

ok. and as a fall-back test try to run it in a fresh emacs by enabling direnv-mode, then opening a file in a directory that has an already allowed envrc, then running a shell command. (it may help to rule out issues related to allow/deny or other initial setup issues)

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

the *direnv* buffer is hidden. try adding a space in front so that it becomes "space" *direnv*. (github markup does not like me typing that.)

(update: the leading space is not there anymore b/c too much confusion)

from emacs-direnv.

cwdurst avatar cwdurst commented on August 25, 2024

OK, it looks like the "direnv-update-environment" command fixed it.

The biggest problem for me is that I'm trying to use Python virtualenv ("layout python"), and if "direnv.el" has gone into disabled mode, my compile scripts will use the system version of "pip" and "python" instead of the virtualenv versions. And that can be very confusing.

It would be nice if "direnv.el" made it much more obvious when it goes into disabled mode.

Perhaps by changing the color of the mode lines or any other visible change. Or at least flash some error messages. I can't see any errors that were logged.

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

hmmm, i successfully use exactly what you describe: direnv with python virtualenvs, and automatic switching whenever i switch to a file from another project. this is my config:

(use-package direnv
  :custom
  (direnv-always-show-summary t)
  (direnv-show-paths-in-summary nil)
  :config
  (direnv-mode))

it shows a summary in the echo area, and i use (direnv-mode) so that i never have to use (direnv-update-environment) manually.

when using (direnv-mode), the only way it can get disabled automatically is when an error occurs (to which emacs responds by disabling the post-command hook). if you have any problems, have a look at the *direnv* (with space in front) buffer to see what the cause may be.

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

the scenario you want to have is supported by this package (and in fact how i use it myself).

It would be nice if "direnv.el" made it much more obvious when it goes into disabled mode.

emacs gives explicit errors when post-command hooks give errors, there is nothing this package can do since the post-command hook is the one doing the work, and that one gets disabled by emacs automatically on errors.

i will close this issue. feel free to provide new info that would warrant reopening. thanks!

from emacs-direnv.

glasser avatar glasser commented on August 25, 2024

I think the key information in this issue is that @cwdurst was trying to run M-x compile from a shell buffer. direnv-update-environment only works on buffers that have files, and shell buffers don't have files.

I'd like to see direnv work in shell buffers as well. Could direnv-update-environment look at default-directory for non-file buffers? (Of course to get this working properly in shell buffers you also need to use something like dirtrack mode.)

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

I'm having this same problem when using projectile-compile-project. Here is the output of my *direnv* buffer:

{
  "Access": "/opt/moose/seacas",
  "CC": "mpicc",
  "CPATH": "/opt/moose/tbb-2018_U3/include",
  "CPLUS_INCLUDE_PATH": "/opt/moose/mpich-3.3/clang-8.0.0/include",
  "CXX": "mpicxx",
  "C_INCLUDE_PATH": "/opt/moose/mpich-3.3/clang-8.0.0/include",
  "DIRENV_DIFF": "eJzsVkuTqjoX_S-MOwR8oVadAeCLbkXbR9uOKIQI0UBogoqeOv_9q6DnqIDf7Vt3cCd3JDt77WRnrWSZn0IktH8KvYk6HwhtAe5ZDAl1bAKZb8cInpkPGU4Q2OxDJ8E0ZO07jI4IseMMVBcVUb4rusMvGIoZDByXulvo0uQMmY8IYY844UUYqea1D-FFKHZEowQG9g5BgtcoRQ70wv0ah7kFRMd2_EsP54jsPRzCyw-DLo5ReAAAXD7yhdEJhQdYMuMlwXwclO4mq7i1-SfMPnJJ9ie-fLFcPkEpwQcEK5Lc4rUwbTasRg24dnx8RHI2EpTicEM5UPj1IoRcSlXXu7MZZy7ji1KGIEO2Y3OGdV1oC0GEHYcHvym-AZP1GlQkuWktqhCHDtm7KAMOFzPLMPXhotO1ilV8Qh9UxSp0iB16oClKonRf__l5XTZNefgPpuoY0675YXWMqdAWwKMYHersAxQmDEYx3SInYXCNGQ1vZUt1rg-6nBz0mkrnrTzW9O5CHevKomtV1PlhdDSndpD4q_57Ups0o0A7no60FqbKYWUPrQ5BVn22rfabX4uqtgCb5WqBvlyjr-AYuSewPVb3Xz3nc2rsXUd_PdUH7-dl5Et0qzSOlZq8Wm8nm-HkLVTOrXTw0UqoaTWQFfcmS-Ow-2h0nL12fI9bm4b6aS_lj8PAZOfla80MqVI5j2aaP3nbeNWR4Rvvu3rP7Nn91K42u7Gdbsnbbgu2MgqOlvbVstR3VZ1YVqevjaL3Hz-EF6GnKBcVNorCw5Z0DVsSD_WH6G8qU2IKAXX3BDFYE6sZDif8ToJnvlBybR0aRAQVTOdfMKa-rluaYT4S4jkOaGab49fvAhoa2jMQwetGrf0s9TTBo98mYEcRQVcrkJtiQ5RghrsuPlKfdnjZfmDzPoeGNlWnq-cXn-D1DVZyRwk5BFf5L9Cbb9-hXJqePBQCWWyKco2v3S440q2vh_3HduQf8BlUxGrzvvkHULiPCE1ATWyI9XIIcegByHzx0nT5gS5frEhku803Ph7PupY-VM1-UfoiTRn6daxxA5Ibf0Ymk5m1NDoZgXKTqzmaGNZgPOp-4wZm6KGm6m9dsyO0ha-krnre3f_nU0Wyf56CIrnRvBb5NMFrUBFritiq5HPRzgMODTfYA5JYaYlyofhBwlzyJl4uEeAQOzR07UKiVM_8tDdR8t3cX-e_9LPvvTsosWPM8hP-9475P--Y5yzgBMVB5ZvMX5mK7ZS6dakCADi66dWoJ935TL8-Ie7PK0qYA6qiLIn122Gy7g4ToFHC69_6lj42e0a_xByLpz7aeZcBXrqaD8YlZvl4LF0cegxGp8TPHi9zTZuOx_Onhn2BFDd0D_n1638BAAD__01X8Uw=",
  "DIRENV_DIR": "-/Users/mcdodj/Documents/projects/bison",
  "DIRENV_WATCHES": "eJx0zj1OBCEUAOC7UE_2ATvMwNRamthYGQt4P8pmBwywo4nx7vYaL_Dle_5Sj3G8qU3BU-fWYUeqdIG7iredy-jw3uqFcXRIudcCJy5HQzWph0oj76w241YbjPfLPKn7z9xHV9toN_6e_rFPWIvkV6DcuBwQr9f6AXaW1VvHNszWJ4Nno72zMSBhPKfg3MIhIQk5FNFaGxa38EraxjlKkj-j1emw_Bq9_AQAAP__DGBMpQ==",
  "F77": "mpif77",
  "F90": "mpif90",
  "FC": "mpif90",
  "FPATH": "/opt/moose/mpich-3.3/clang-8.0.0/include:/usr/local/Cellar/modules/4.3.0/init/zsh-functions:/Users/mcdodj/.cache/zsh/zplugin/completions:/usr/local/share/zsh/site-functions:/usr/local/Cellar/zsh/5.7.1/share/zsh/functions:/Users/mcdodj/dotz/shells/zsh/functions",
  "GCC_BIN": "/opt/moose/gcc-8.3.0/bin",
  "GCC_LIB": "/opt/moose/gcc-8.3.0/lib64:/opt/moose/gcc-8.3.0/lib:/opt/moose/gcc-8.3.0/lib/gcc/x86_64-apple-darwin18.6.0/8.3.0",
  "GCC_MAN": "/opt/moose/gcc-8.3.0/share/man",
  "LIBRARY": "/opt/moose/tbb-2018_U3/lib",
  "LIBRARY_PATH": "/opt/moose/llvm-8.0.0/lib",
  "MANPATH": "/opt/moose/doxygen-1.8.14/man:/opt/moose/seacas/share/man:/opt/moose/graphviz-2.38.0/share/man:/opt/moose/gnuplot-4.6.5/share/man:/opt/moose/lcov-1.14/share/man:/opt/moose/mpich-3.3/clang-8.0.0/share/man:/opt/moose/gcc-8.3.0/share/man::",
  "MOOSE_CLANG_LIB": "/opt/moose/llvm-8.0.0/lib",
  "MOOSE_JOBS": "16",
  "MOOSE_PPS_WIDTH": "180",
  "MPI_HOME": "/opt/moose/mpich-3.3/clang-8.0.0",
  "MPLBACKEND": "qt5Agg",
  "PATH": "/opt/moose/doxygen-1.8.14/bin:/opt/moose/seacas/bin:/opt/moose/graphviz-2.38.0/bin:/opt/moose/glib-2.47.92/bin:/opt/moose/pkg-config-0.29.1/bin:/opt/moose/gnuplot-4.6.5/bin:/opt/moose/lcov-1.14/bin:/opt/moose/miniconda/bin:/opt/moose/mpich-3.3/clang-8.0.0/bin:/opt/moose/llvm-8.0.0/bin:/opt/moose/gcc-8.3.0/bin:/usr/local/Cellar/modules/4.3.0/bin:/Users/mcdodj/.cache/zsh/zplugin/polaris/bin:/usr/local/opt/make/libexec/gnubin:/Users/mcdodj/.cache/zsh/zplugin/plugins/direnv---direnv:/Users/mcdodj/.pyenv/bin:/Users/mcdodj/.pyenv/shims:/Users/mcdodj/dotz/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/texlive/2019/bin/x86_64-darwin:/usr/local/opt/texinfo/bin:/Users/mcdodj/.cache/zsh/iterm2/bin:/Users/mcdodj/.cache/zsh/zplugin/plugins/raxod502---wdx/bin",
  "PETSC_DIR": "/opt/moose/petsc-3.10.5/mpich-3.3_clang-8.0.0-opt",
  "PKG_CONFIG_PATH": "/opt/moose/pkg-config-0.29.1/pkgconfig",
  "PYTHONPATH": "/opt/moose/llvm-8.0.0/bindings/python",
  "TBBROOT": "/opt/moose/tbb-2018_U3",
  "TBB_DIR": "/opt/moose/tbb-2018_U3"
}

direnv: loading .envrc
direnv: export +ACCESS +CC +CPATH +CPLUS_INCLUDE_PATH +CXX +C_INCLUDE_PATH +F77 +F90 +FC +GCC_BIN +GCC_LIB +GCC_MAN +LIBRARY +LIBRARY_PATH +MOOSE_CLANG_LIB +MOOSE_JOBS +MOOSE_PPS_WIDTH +MPI_HOME +MPLBACKEND +PETSC_DIR +PKG_CONFIG_PATH +PYTHONPATH +TBBROOT +TBB_DIR ~FPATH ~MANPATH ~PATH

When I run projectile-compile-project in dired-mode inside the root-directory of my project. I think get this error in the compilation buffer:

-*- mode: compilation; default-directory: "~/Documents/projects/bison/" -*-
Compilation started at Tue Nov  5 12:50:12

./moose/scripts/update_and_rebuild_libmesh.sh
We could not find an installed PETSc (no PETSC_DIR environment variable set), so the
PETSc submodule will be used. You may see some test failures until we officially support the

As you can see, direnv is setting the PETSC_DIR var. Not sure why this isn't working.

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

very strange indeed. i don't see anything obviously wrong. does it work without direnv-mode (to rule out automatic setting/unsetting for now), but after a successful direnv-update-environment from a file buffer inside the project? that should set the right environment inside emacs.

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

I can run the same commands with direnv in my terminal and it works. So I'm wondering it's something to do with the way I set up my path. Here is how I setup direnv and projectile in my init.el.

(use-package direnv
    :demand t
    :after (exec-path-from-shell)
    :config
    (direnv-mode +1))

(use-package projectile
    :custom
    (projectile-completion-system 'ivy)
    (projectile-enable-caching t)
    (projectile-switch-project-action 'projectile-dired)
    :config
    (add-to-list 'direnv-non-file-modes 'projectile-mode)
    (projectile-mode 1))

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

i have a similar setup. projectile-mode is a minor mode though, not a major mode, so no point adding it to the list.

are you sure exec-path-from-shell is loaded?

also try inspecting the variables default-directory and exec-path in that compilation buffer using C-h v.

also try keeping another (split) window open with the *direnv* buffer, and see if anything changes when you start the compilation buffer.

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

are you sure exec-path-from-shell is loaded?

I have use-package on verbose mode, and it's giving the proper loading messages. I also can grab a few specific env variables using (getenv "CACHE") and it shows up correctly.

also try inspecting the variables default-directory and exec-path in that compilation buffer using C-h v.

While i'm inside the *compilation* buffer, both variables are described as being correct.

also try keeping another (split) window open with the direnv buffer, and see if anything changes when you start the compilation buffer.

This buffer doesn't change when trying to compile.

A few things I noticed. I tried running

M-x projectile-compile-project <RET> echo $PATH; make -j 16 <RET>

The path shown before the compilation starts is incorrect. I get this same behavior when just using the compile command as well.

I have also tried adding compilation-mode to to direnv-non-file-modes such that it now looks like:

((comint-mode term-mode vterm-mode compilation-mode)
 eshell-mode dired-mode magit-mode)

and am still can't compile.

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

I just noticed this in my Messages buffer. it seems whenever I move in and out of my direnv folder I am getting these:

direnv: +ACCESS +CC +CPATH +CPLUS_INCLUDE_PATH +CXX +C_INCLUDE_PATH +F77 +F90 +FC +GCC_BIN +GCC_LIB +GCC_MAN +LIBRARY +LIBRARY_PATH +MOOSE_CLANG_LIB +MOOSE_JOBS +MOOSE_PPS_WIDTH +MPI_HOME +MPLBACKEND +PETSC_DIR +PKG_CONFIG_PATH +PYTHONPATH +TBBROOT +TBB_DIR ~FPATH ~MANPATH ~PATH (~/Documents/projects/bison)
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-added [24 times]
Invalid face reference: diff-changed [3 times]
Compilation exited abnormally with code 2
direnv: ~FPATH ~MANPATH ~PATH -ACCESS -CC -CPATH -CPLUS_INCLUDE_PATH -CXX -C_INCLUDE_PATH -F77 -F90 -FC -GCC_BIN -GCC_LIB -GCC_MAN -LIBRARY -LIBRARY_PATH -MOOSE_CLANG_LIB -MOOSE_JOBS -MOOSE_PPS_WIDTH -MPI_HOME -MPLBACKEND -PETSC_DIR -PKG_CONFIG_PATH -PYTHONPATH -TBBROOT -TBB_DIR (~/Documents/projects/bison → ~/dotz/editors/emacs.d)
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Invalid face reference: diff-changed [3 times]
Invalid face reference: diff-removed [24 times]
Mark saved where search started [3 times]

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

please open a new bug about the face references

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

does M-x compile output when you use env (which prints the environment) as the command show the right environment?

(try the same without direnv-mode but after direnv-update-environmemt).

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

Apologies for the delayed response. I did you said and ran M-x compile with env with direnv-mode on and off. I got the same results both times. It's outputting the correct environment for evything but PATH:

-*- mode: compilation; default-directory: "~/Documents/projects/bison/" -*-
Compilation started at Mon Dec  2 13:34:44

env
PWD=/Users/mcdodj/Documents/projects/bison
TERM=dumb
TERMCAP=
COLUMNS=543
INSIDE_EMACS=27.0.50,compile
[...]
MOOSE_JOBS=72
MOOSE_DIR=/Users/mcdodj/Documents/projects/bison/moose
MOOSE_CLANG_LIB=/opt/moose/llvm-9.0.0-rc6/lib
[...]
TMPDIR=/var/folder
Compilation finished at Mon Dec  2 13:34:47

Everything with /opt/moose is what is being added by my .envrc. The path should be:

("/opt/moose/icecream/libexec/icecc/bin/" "/opt/moose/icecream/sbin/" "/opt/moose/icecream/bin/" "/opt/moose/ccache-3.2.1/bin/" "/opt/moose/doxygen-1.8.15/bin/" "/opt/moose/seacas/bin/" "/opt/moose/graphviz-2.38.0/bin/" "/opt/moose/glib-2.47.92/bin/" "/opt/moose/pkg-config-0.29.1/bin/" "/opt/moose/gnuplot-4.6.5/bin/" "/opt/moose/lcov-40580cd6/bin/" "/opt/moose/gperftools-2.7/bin/" "/opt/moose/mpich-3.3/clang-9.0.0/bin/" "/opt/moose/llvm-9.0.0-rc6/bin/" "/opt/moose/gcc-9.2.0/bin/" "/Users/mcdodj/.config/pyenv/bin/" "/Users/mcdodj/.config/pyenv/shims/" "/Users/mcdodj/.cache/zsh/zplugin/polaris/bin/" "/Users/mcdodj/dotz/bin/" "/usr/local/opt/fzf/bin/" "/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/local/sbin/" "/usr/sbin/" "/sbin/" "/usr/local/texlive/2019/bin/x86_64-darwin/" "/usr/local/opt/texinfo/bin/" "/usr/local/Cellar/emacs-head/HEAD-19aecd3_1/libexec/emacs/27.0.50/x86_64-apple-darwin18.7.0/")

from emacs-direnv.

dylanjm avatar dylanjm commented on August 25, 2024

Here is a reproducible init.el file that I am running with the command emacs -Q --load ~/.emacs.d/mini-init.el

(eval-and-compile
  (defvar straight-recipes-gnu-elpa-use-mirror t)
  (defvar bootstrap-version 5)
  (defvar bootstrap-file
    (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)))

(with-no-warnings
  (setq-default straight-cache-autoloads t
                straight-recipe-overrides nil
                straight-repository-branch "develop"
                straight-use-package-by-default t
                straight-check-for-modifications '(find-at-startup find-when-checking)))

(unless (file-exists-p bootstrap-file)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
       'silent 'inhibit-cookies)
    (goto-char (point-max))
    (eval-print-last-sexp)))

(load bootstrap-file nil 'nomessage)
(straight-use-package 'use-package)

(use-package exec-path-from-shell
  :straight t
  :if (eq system-type 'darwin)
  :config
  (exec-path-from-shell-initialize))

(use-package direnv
  :straight t
  :config (direnv-mode +1))

from emacs-direnv.

wbolster avatar wbolster commented on August 25, 2024

that sounds like the most plausible explanation indeed: shell initialisation changing $PATH again.

closing for now, since there seems no further actionable info in this ticket.

from emacs-direnv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.