-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
additional stuff added to PATH after starting emacs #469
Comments
Hey,
That being said, everything before and including At this point I think of the following action item. Since this WDYT? |
So I did few changes in #470. You can see example of the output here. First of all, there is an explicit message saying that your
This is the value of Secondly, there is a message about
Last, but no the least, I changed how In case you want to test it before I merge the PR, just do the following (assuming you have
Thanks. |
Oh, and by the way, if you find this feature troubling, please share your thoughts on this. If PATH injections gets some critical cons, I might make it possible to opt out. Though in general I think it's a good feature all things considered. |
FYI, PR is merged. So you can try again building from master. If you still get junk in |
I think I ended up with unexpected formatting in my PATH, after a recent <dict>
<key>PATH</key>
<string>[/Users/jcsims/.nix-profile/bin, /nix/var/nix/profiles/default/bin, /usr/local/bin, /Users/jcsims/bin, /Users/jcsims/go/bin, /Users/jcsims/.cargo/bin, /opt/homebrew/bin, /opt/homebrew/sbin, /usr/bin, /bin, /usr/sbin, /sbin]</string>
</dict> This resulted in e.g. |
@jcsims I just reinstalled. I have the same problem. In a shell before starting emacs (edited for brevity):
After starting emacs, in a shell inside emacs (edited):
|
Regarding path injection : I suggest making an option, default OFF. |
@jcsims @haroldcarr oops, that's by mistake. Fixed that in 3737ab5 One of the reasons for PATH injection is to make native compilation to work even when you run Emacs.app from finder/docker and this formatting just broke everything. Apologies 🙏 @haroldcarr It's nice to see that the original issue is fixed as well, e.g. no junk is appended. Still not sure why you got it, maybe brew prefix is messed up 🤷 @haroldcarr why do you think it should be off? Genuinely would like to hear why you specifically want to disable it and why you think it should be disabled by default. Just don't want to break some workflows in pursuit of helping others. Well, of course, aside this bug that should be fixed and forgotten. |
I now understand that you need this to make native compilation work when starting Emacs.app from finder/docker. So having it on my default seems like a good idea. But it might be good to have an option to disable it. I start emacs from a script (run from a terminal that has $PATH set to what is needed) that essentially does:
The script actually decides which version of emacs is available on the particular machine I am starting it on and start that version. |
@d12frosted yay, thanks for the quick fix! I |
@haroldcarr I see, thanks for sharing your use case. Since you run this script from terminal that has some
The first one sounds nice. First of all, I didn't expect inheritance to work. And secondly, I didn't expect it to work in this way. The second one sounds meh from the first point of view. But in case it is set to correct value, you don't need to mess with it and it brings lots of value. And in case you need to mess around with it, you can always do it from So hopefully this makes everyone happy without adding more branching to the formula. Anyways, let me know if you want me to share all details I gathered during this small investigation. And thank you for reporting this issue. Not only I have improved PATH injection procedure, I've also learned few new things. The only sad part is that accidentally I've broken Emacs for some users in-between. |
@jcsims you are welcome 😸 enjoy! and sorry about the breakage 🙏 |
I reinstalled and everything is fine now. Thanks! I am not sure which of those two scenarios would work best for my use-case and for others. I start emacs from a script that searches and ordered list and uses the first emacs it finds. Another thing I do is use the NIX package manager. In that case, I often use Someday I hope to use home-manager and/or direnv to automate that process, but I'm not there yet. Thanks for your work! |
@haroldcarr great to hear that it works for you now as well.
My investigation shows that in this case
Can you please do the same and check if you also get different The reason I am asking to test it without PATH injection is because it seems that you use Thanks in advance! I hope you don't mind me bothering you with all these flows and checks. |
For completeness, starting this way works:
|
@haroldcarr can you please try the same thing with http://emacsformacosx.com/? Regarding using |
|
What emacsformac does would screw up a nix experience. This has been useful for me. I am going to stop using |
@haroldcarr Thank you for taking your time to test things. I also learned new things :) Considering all the information we gathered, I think at this point there is no need to have an option to opt out from PATH injection. Just to make things clear (and not to force anyone to read whole thread), here are the main reasons to keep things as is:
That being said, I am not opposed to idea of having ability to opt out from PATH injection, it's just that at this point I see no value (and I want to avoid unnecessary branching in formula). If someone reports use case where is this needed, I will reconsider my decision. |
I agree : Thank you! |
When I directly run emacs-plus, I get a correct brew services start d12frosted/emacs-plus/emacs-plus@28
How do I resolve this issue? I managed to workaround this issue by running emacs daemon |
Another issue I seem to be running into is this PATH injection will create problems with a stale path for developers that use any kind version manager for their language interpreters. NVM comes to mind: it calls This has several functions but one of them is aliasing |
@codevbus I wonder, how do you deal with
I general, due the the way |
Hey sorry to bump this old thread, but it's linked in the readme. |
Hi. I cannot determine why the path is not being injected. From Finder or Spotlight, if I click on or open Emacs.app, the path will not be injected, but if I click on Emacs.app/Contents/MacOS/Emacs, the path will be inserted. It seems like the app is not reading the Info.plist. Has anyone see this? Edit: I'm on a beta of macOS 15.0. I'm thinking their could be a deprecation issue. TBH, I do not recall this problem before I upgraded. |
I see. Thank you. I’ll follow the conversation there.
…On Thu, Sep 12, 2024 at 06:41 Boris Buliga ***@***.***> wrote:
@jotaemei <https://github.com/jotaemei> there is an issue for this #720
<#720>
—
Reply to this email directly, view it on GitHub
<#469 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5GEROCVXAG2ELOV3VQ2Z3ZWFVW3AVCNFSM6AAAAABOB6S7KWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVHEYTGNZUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have been using emacs-plus since 27.?.
I install via
I just upgraded from Big Sur to Monterey then did:
Now I am getting a behavior that was not happening before.
from a terminal:
Then after starting emacs and running a shell in emacs I see:
Note the additional paths put in front of the existing path:
Any idea what is going on?
The text was updated successfully, but these errors were encountered: