Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[General]: exec-paths not being set in Sequoia for emacs-plus@30 #720

Open
efroemling opened this issue Aug 30, 2024 · 8 comments
Open

[General]: exec-paths not being set in Sequoia for emacs-plus@30 #720

efroemling opened this issue Aug 30, 2024 · 8 comments

Comments

@efroemling
Copy link

efroemling commented Aug 30, 2024

Issue description

I just updated my setup to beta 7 of macOS Sequoia and noticed that the path values embedded in the Emacs.app's plist no longer seem to be getting applied. I did a fresh uninstall/reinstall of emacs-plus@30 to no avail. It seems the values get inserted into the plist correctly but emacs doesn't seem to be applying them.

For now I'm just manually setting exec-path to what the plist contains in my .emacs so I'm all good, but wanted to mention this just to get it on the radar since Sequoia RC is likely a week or two out. Anyone else running the beta and seeing this same behavior?

@efroemling
Copy link
Author

efroemling commented Aug 30, 2024

Hmm; just tested with -q and the embedded paths are showing up, so it seems it might be a weird interaction with something in my .emacs and Sequoia. I'll poke around and will follow up or close this soon.

FOLLOWUP: Oops that was just because I ran emacs -q from a terminal so it picked up my paths that way. If I temporarily blow away my .emacs and launch Emacs.app via the finder I do not see the embedded paths.

@d12frosted
Copy link
Owner

Can you double check that PATH value under less $(brew --cellar emacs-plus@30)/30.0.50/Emacs.app/Contents/Info.plist (adjust it to relevant version of Emacs.app you are starting) is a correct one?

If it is, I have no clues why on Sequioia it doesn't work and I am not going to upgrade on my laptops as I need them stable - can't afford something to break :) But I will try to get my hands on another machine to test.

@jotaemei
Copy link

Hi all. I had made the mistake of downgrading to emacs-plus@29 to resolve this before realizing that it was likely the upgrade to a beta of the upcoming macOS version.

One curious thing I've noticed is that while clicking on the .app bundle does not set the path, if you click on the executable within the bundle (Emacs.app/Contents/MacOS/Emacs), the path from Info.plist will be set. Likewise, the path will be set correctly if you click on the Bash script at /usr/local/Cellar/emacs-plus@##/##.#/bin/emacs that calls (exec) the executable.

@efroemling
Copy link
Author

efroemling commented Sep 17, 2024

Can you double check that PATH value under less $(brew --cellar emacs-plus@30)/30.0.50/Emacs.app/Contents/Info.plist (adjust it to relevant version of Emacs.app you are starting) is a correct one?

If it is, I have no clues why on Sequioia it doesn't work and I am not going to upgrade on my laptops as I need them stable - can't afford something to break :) But I will try to get my hands on another machine to test.

Sorry for the slow reply here, but just checked and can confirm that the PATH in the plist seems to be correct; it's just somehow not ending up applied. Also just confirmed this is still happening on the release version of Sequoia in case you're planning on upgrading at this point and can try to repro.

@jotaemei
Copy link

jotaemei commented Sep 17, 2024

Also just confirmed this is still happening on the release version of Sequoia in case you're planning on upgrading at this point and can try to repro.

That's a shame. I was hoping (though imagining it would be unlikely) that it would be resolved in the finalized Sequoia release. I've not been able to upgrade from the beta though. as AFAICT, the beta is being classified by the OS itself as the release. Either that, or my upgrade from the beta to the release took all of 1-2 mins when I restarted the computer last night.

@d12frosted d12frosted pinned this issue Sep 18, 2024
@d12frosted
Copy link
Owner

I will try to upgrade one of my machines to Sequoia ASAP (still need to plan to do it without any potential work disruptions), but meanwhile you can use https://github.com/purcell/exec-path-from-shell

@d12frosted
Copy link
Owner

Ok, so I've upgraded one of my laptops and I can confirm the difference in behaviour between Sequoia and previous OS version.

Test 1

mv ~/.config/emacs ~/.config/emacs.bak
export PATH=/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
brew install emacs-plus@30

Result: plist contains all the correct values, but when I start Emacs.app from Finder the PATH value (I inspect it using M-! echo $PATH <ret>) matches the one I have in Terminal session.

Test 2

Emacs 29.4-1 from Emacs For macOS.

Result: the PATH value matches the one I have in Terminal session.


I don't fully understand what's happening and what has changed. But it seems that there is something happening even in Sonoma. Maybe I am just tired and made a mistake in my tests 🤷

@cfclrk
Copy link

cfclrk commented Sep 26, 2024

On Emacs 29: I just upgraded to Sequoia and I am getting this problem as well. I can see my intended $PATH value in Info.plist. But when Emacs starts, PATH is not customized:

(getenv "PATH")
"/usr/bin:/bin:/usr/sbin:/sbin"

If I run M-! echo $PATH, Emacs shows me the full, expected PATH.

Using exec-path-from-shell is working for me in the interim until we figure this problem out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants