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

source-directory is "/Users" #68

Closed
codesuki opened this issue Feb 25, 2022 · 4 comments
Closed

source-directory is "/Users" #68

codesuki opened this issue Feb 25, 2022 · 4 comments
Labels

Comments

@codesuki
Copy link

Hi! Thanks for this nice and easy to use tool, I replaced my shell script with it :)

I wanted to look into the code of kill-buffer and got an error that sources could not be found.
I saw this in site-start.el

;; Allow Emacs to find bundled C sources.
(setq source-directory (expand-file-name ".."))

So it seems when this gets executed the working directory is my user directory. ("/Users/name")

@jimeh jimeh added the bug label Feb 25, 2022
@jimeh
Copy link
Owner

jimeh commented Feb 25, 2022

Ha, indeed so it is. That's interesting, when I first implemented that, it was being set to .. relative to the site-start.el file in Emacs.app/Contents/Resources/lisp.

@jimeh jimeh closed this as completed in 07e0e3d Feb 25, 2022
@jimeh
Copy link
Owner

jimeh commented Feb 25, 2022

Turns out it took less than two minutes to find, test, and commit a fix :)

@jimeh
Copy link
Owner

jimeh commented Feb 25, 2022

You can fix it in already built Emacs.app bundles, avoiding a full re-build, by modifying Emacs.app/Contents/Resources/lisp/site-start.el, changing this:

;; Allow Emacs to find bundled C sources.
(setq source-directory (expand-file-name ".."))

To this:

;; Allow Emacs to find bundled C sources.
(setq source-directory
      (expand-file-name ".." (file-name-directory load-file-name)))

@codesuki
Copy link
Author

codesuki commented Mar 1, 2022

That was quick! Thanks a lot :)

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

No branches or pull requests

2 participants