Enable relative path for Emacs.app
liambresnahan opened this issue · comments
I use Doom and seem to be running into an issue when running doom sync
which I believe generates the autoload
files that emacs needs to start. Seems that there are some hardcoded items from the build machine:
doom doctorWarning: arch-dependent data dir '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/MacOS/libexec/': No such file or directoryWarning: arch-independent data dir '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/etc/': No such file or directoryWarning: Lisp directory '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/lisp': No such file or directoryError: /Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/etc/charsets: No such file or directoryEmacs will not function correctly without the character map files.Please check your installation!\
Could these be turned into relative paths to enable items requiring these locations to run as expected please?
BTW - I validated that the build itself if built locally works as expected (using your script). I can generate the autoloads
files as expected when running doom sync
@liambresnahan there's a change your local build works cause you still have the workdir used to build Emacs in sources/
, as the original Emacs.app would still be in there. Try moving that out of the way and see if doom sync
still works.
ah ha! Yes, that breaks it with the same error as above
Awesome, that should make things slightly easier to debug, thanks :)
@liambresnahan I'm afraid I haven't been able to reproduce this issue myself. But after a bit of digging online, I suspect it might be related to how you're making emacs
available as a command in your shell. Are you by chance symlinking /Applications/Emacs.app/Contents/MacOS/Emacs
to /usr/local/bin/emacs
or something similar?
If that is the case, would you mind trying the alias-based method from the readme of my build script? https://github.com/jimeh/build-emacs-for-macos#use-self-contained-emacsapp-as-emacs-cli-tool
So, it turns out I wasn't, but I am now :). Looks like the alias based method works - thanks!