2

I am running homebrew on an M2 Mac mini under macOS Ventura.

I use Emacs.app from the railwaycat/emacsmacport/emacs-mac cask and when I check in Emacs the inherited PATH environment variable, Emacs returns something with /opt/homebrew/bin at the beginning.

I start Emacs.app via double-clicking, so I assume no terminal shell gets started for this. (Plus I do not use the exec-path-from-shell package in Emacs.)

Where in the startup process does homebrew's bin directory get added? I looked at:

  • /etc/paths.d, but homebrew doesn't add any entry there.

  • ~/.zprofile and homebrew does add stuff in there. This stuff shows up in Emacs (when I check in Emacs via getenv PATH). However, I have no idea why this happens (because, as mentioned above, no shell should get started.)

10
  • 2
    Which GUI apps do have Homebrew in their PATH (and how do you verify this) ?
    – nohillside
    Commented Jan 25 at 12:22
  • 1
    @nohillside Thanks for chiming in! I have added a footnote to my question to explain.
    – halloleo
    Commented Jan 26 at 2:03
  • How do you start Emacs, which file do you run or double-click? How do you check PATH? By using (getenv "PATH") in the scratch buffer or by running a shell within emacs? In the first case, did you chenck the Emacs init file?
    – nohillside
    Commented Jan 26 at 5:22
  • Also, is the path you get in Emacs identical to the path you have in Terminal?
    – nohillside
    Commented Jan 26 at 5:38
  • 1
    Also, if you change PATH in .zprofile and then restart Emacs, does the change show up in Emacs as well?
    – nohillside
    Commented Feb 1 at 7:49

0

You must log in to answer this question.

Browse other questions tagged .