My problem is simple, I'm working in embedded systems with a RTOS named zephyr. To compile my projects I need some variables set in PATH and the problem is that when I run
projectile-compile-project and the compilation mode windows are open, my compilation fail because the compilation mode doesn't see the
PATH variable. How can I make my variables be seen in compilation mode?
I tried this in my
init.el (I just see some solutions and this worked for some people, so I tried and it failed, I don't know exactly if this lines bring some problem):
(let ((path (shell-command-to-string ". ~/.bashrc; echo -n $PATH"))) (setenv "PATH" path) (setq exec-path (append (split-string-and-unquote path ":") exec-path))) (setenv "PATH" (concat (getenv "PATH")))
I realized that if I open Emacs from terminal this problem doesn't occur. What can I do to this problem doesn't occur regardless of where I open Emacs?