Ideas of things you can check #1 from emacs type ESC ! whoami to check the user name that emacs is running under. It should be you... #2 Are you using the export command .. 'export <SHELLVARIABLE>' command to export your shell variables the spawned environment?
On Tue, Apr 20, 2021 at 9:00 PM Duke <dukeofpurl@gmx.com> wrote:
>
> [...] when I want to run a program from the zsh shell from emacs, zsh chokes saying it can't find the program.
What does "whence -a the_failing_program" say when running from the
shell from emacs? What does "print -r -- $path" say?
On Tue, 20 Apr 2021 21:10:10 -0700 Bart Schaefer <schaefer@brasslantern.com> wrote: > On Tue, Apr 20, 2021 at 9:00 PM Duke <dukeofpurl@gmx.com> wrote: > > > > [...] when I want to run a program from the zsh shell from emacs, > > zsh chokes saying it can't find the program. > > What does "whence -a the_failing_program" say when running from the > shell from emacs? (Shell command failed with code 1 and no output) > What does "print -r -- $path" say? Prints the $PATH list, but does not include the path of the failing_program
On Wed, Apr 21, 2021, at 12:21 AM, Duke Normandin wrote:
> On Tue, 20 Apr 2021 21:10:10 -0700
> Bart Schaefer <schaefer@brasslantern.com> wrote:
> > What does "print -r -- $path" say?
>
> Prints the $PATH list, but does not include the path of the failing_program
So your PATH actually isn't set correctly within emacs. Through what
mechanism is failing_program's directory added to PATH "normally"?
vq
On Wed, 21 Apr 2021 00:51:20 -0400
Lawrence Velázquez <larryv@zsh.org> wrote:
> On Wed, Apr 21, 2021, at 12:21 AM, Duke Normandin wrote:
> > On Tue, 20 Apr 2021 21:10:10 -0700
> > Bart Schaefer <schaefer@brasslantern.com> wrote:
> > > What does "print -r -- $path" say?
> >
> > Prints the $PATH list, but does not include the path of the
> > failing_program
>
> So your PATH actually isn't set correctly within emacs. Through what
> mechanism is failing_program's directory added to PATH "normally"?
The compiler - the failing_program - works just fine from a plain terminal. It IS in my $PATH. zsh finds it no problem.
I set $PATH in both ~/.zshrc and ~/.zprofile
--
Duke Normandin <dukeofpurl@gmx.com>
> On Apr 21, 2021, at 12:59 AM, Duke Normandin <dukeofpurl@gmx.com> wrote: > > The compiler - the failing_program - works just fine from a plain terminal. It IS in my $PATH. zsh finds it no problem. It’s in the PATH you have at a terminal. It is *not* in the PATH within emacs, which is what we are concerned with right now. If it were, we wouldn’t be having this conversation. > I set $PATH in both ~/.zshrc and ~/.zprofile How exactly are you attempting to launch the compiler? It doesn’t sound like you’re doing it from an interactive shell. -- vq Sent from my iPhone
On Tue, Apr 20, 2021 at 9:57 PM Duke Normandin <dukeofpurl@gmx.com> wrote:
>
> I set $PATH in both ~/.zshrc and ~/.zprofile
Neither of which is read by a non-interactive shell.
You either need to (preferably) set the path correctly in the
environment of emacs, or set it in ~/.zshenv which is read by all
shells.
On Tue, 20 Apr 2021 23:10:38 -0700 Bart Schaefer <schaefer@brasslantern.com> wrote: > On Tue, Apr 20, 2021 at 9:57 PM Duke Normandin <dukeofpurl@gmx.com> > wrote: > > > > I set $PATH in both ~/.zshrc and ~/.zprofile > > Neither of which is read by a non-interactive shell. Didn't know that! Thanks for clue-ing me in ... > You either need to (preferably) set the path correctly in the > environment of emacs, How/where do I "set the path correctly in the environment of emacs" ? > or set it in ~/.zshenv which is read by all shells. I copied & pasted the PATH statement in my .zshrc into ~/.zshenv. Problem solved!!! Thanks! Does this mean that my existing PATH statement is built correctly, or could it still be messed up? > -- Duke Normandin <dukeofpurl@gmx.com>
On Wed, Apr 21, 2021, at 9:17 AM, Duke Normandin wrote: > How/where do I "set the path correctly in the environment of emacs" ? By ensuring that whatever process launches emacs provides it with the PATH you want. Your subject suggests that you're launching it directly from fluxbox, so you'll want to figure out - how to make fluxbox set a particular PATH when it launches emacs, or - how to set PATH in the environment of fluxbox itself, so that it gets passed on to emacs. Neither of these things really has anything to do with zsh. There's a fluxbox-users mailing list that you might try. https://sourceforge.net/p/fluxbox/mailman/fluxbox-users/ > I copied & pasted the PATH statement in my .zshrc into ~/.zshenv. > Problem solved!!! Thanks! > > Does this mean that my existing PATH statement is built correctly, or > could it still be messed up? I think setting or modifying PATH in .zshenv is really bad form and should be avoided unless absolutely necessary. I encourage you to figure out how to properly configure the environment for emacs itself. -- vq
On Wed, 21 Apr 2021 12:30:02 -0400 Lawrence Velázquez <larryv@zsh.org> wrote: > On Wed, Apr 21, 2021, at 9:17 AM, Duke Normandin wrote: > > How/where do I "set the path correctly in the environment of > > emacs" ? [snip some good stuff] > I think setting or modifying PATH in .zshenv is really bad form and > should be avoided unless absolutely necessary. I encourage you to > figure out how to properly configure the environment for emacs > itself. Roger, wilco! Thanks! But it's curious that this issue occurs only with emacs. I'll dig into it more as I enjoy using the zsh shell! -- Duke