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

Detect that the current Emacs is Emacs Plus #599

Open
vmsp opened this issue Aug 11, 2023 · 2 comments
Open

Detect that the current Emacs is Emacs Plus #599

vmsp opened this issue Aug 11, 2023 · 2 comments
Assignees

Comments

@vmsp
Copy link

vmsp commented Aug 11, 2023

I'd like a way of detecting in my init.el that the current version of Emacs is Emacs Plus.

My use case is figuring out if exec-path-from-shell should be installed and executed, since Emacs Plus already sets the PATH to the correct value. Something like:

(use-package exec-path-from-shell
  :if (and (memq window-system '(mac ns))
           is-emacs-plus)
  :config
  (exec-path-from-shell-initialize))

I can sort of do this already in Mituharu's port because window-system will be set to 'mac.

@compufox
Copy link

compufox commented Sep 2, 2023

i do this by doing the following: (boundp 'ns-system-appearance)

while its not specific to emacs-plus (that symbol comes in from the patch that provides the ns-system-appearance-change-functions hook), it might work well enough for your purposes!

@jimeh
Copy link

jimeh commented Nov 12, 2024

Depending on how other your PATH env var changes, it might be worth to always use exec-path-from-shell. The path injection feature in emacs-plus seems to inject the current PATH while you build emacs, so changes in your shell setup later won't be picked up by emacs until you reinstall or install a newer version. While exec-path-from-shell loads it up on start up each time.

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

No branches or pull requests

4 participants