plexus / chemacs2

Emacs version switcher, improved
773 stars 46 forks source link

Init cannot be loaded from directory. #28

Open artelse opened 2 years ago

artelse commented 2 years ago

Am trying to setup chemacs with doom and my own config. When trying to load my default config, emacs tells me it cannot find the directory where my config.org file is located. This config.org file is pointed at in my init.el like so: (org-babel-load-file "~/.emacs.d/ae/config.org") Obviously that path is not valid with chemacs. How can I tell emacs the current directory without going through my config and changing everything into hard coded paths? (Yes, am rather new to emacs.)

When trying to load doom, I get something similar: It cannot find the core-modules directory.

This is my chemacs .emacs-profiles.el file:

 (("default"   . ((user-emacs-directory . "~/.emacs.d-ae")))
  ("legacy" . ((user-emacs-directory . "~/.emacs.d-legacy")))
  ("doom"   . ((user-emacs-directory . "~/.emacs.d-doom")))
  ("scimacs" . ((user-emacs-directory . "~/.emacs.d-scimacs"))))
plexus commented 2 years ago

You shouldn't hard code references to .emacs.d. Replace

"~/.emacs.d/ae/config.org"

With

(expand-file-name "config.org" user-emacs-directory)

artelse commented 2 years ago

Thanks, that was the solution I was looking for!