emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal to let Emacs to properly capture $PATH on macOS .


From: Alan Third
Subject: Re: Proposal to let Emacs to properly capture $PATH on macOS .
Date: Fri, 22 May 2020 22:35:58 +0200 (CEST)

On Fri, May 22, 2020 at 10:20:12AM +0200, Vasilij Schneidermann wrote:
> > The current solution for Emacs users is to install a completely
> > avoidable and unnecessary package (exec-path-from-shell)
> > https://github.com/purcell/exec-path-from-shell/
> 
> The parsenv package [1] provides a simpler approach to solve this problem,
> instead of launching a process from the user's shell or parsing their shell
> configuration files, programs parse a so-called dotenv file which just 
> contains
> environment variable mappings.  This is done by a multitude of software
> already, mostly to simplify deployment tasks where configuration is commonly
> performed via environment variables.

macOS already provides a similar set up, but it's barely configurable.
For example:

breton:/Users/alan>/usr/libexec/path_helper
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/alan/.local/bin";
export PATH;

It builds the path from /etc/paths and the files in /etc/paths.d, and
anything else that's already in the environment.

It insists on setting its own order, though. It's a massive pain, but
that's how all the shells on macOS build their initial $PATH.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]