unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Vasilij Schneidermann <mail@vasilij.de>,
	slb zetrov <zetrov.slb@yandex.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: Proposal to let Emacs to properly capture $PATH on macOS .
Date: Fri, 22 May 2020 22:35:58 +0200 (CEST)	[thread overview]
Message-ID: <20200522203556.GA91878@breton.holly.idiocy.org> (raw)
In-Reply-To: <20200522082012.GB299926@odonien.localdomain>

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	other threads:[~2020-05-22 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21  7:21 Proposal to let Emacs to properly capture $PATH on macOS slb zetrov
2020-05-21 13:41 ` Stefan Monnier
2020-05-22  3:11 ` Richard Stallman
2020-05-22  8:20 ` Vasilij Schneidermann
2020-05-22 20:35   ` Alan Third [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522203556.GA91878@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=mail@vasilij.de \
    --cc=zetrov.slb@yandex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).