chemacs2 icon indicating copy to clipboard operation
chemacs2 copied to clipboard

Init cannot be loaded from directory.

Open artelse opened this issue 4 years ago • 2 comments

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"))))

artelse avatar Sep 16 '21 16:09 artelse

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

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

With

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

plexus avatar Sep 17 '21 03:09 plexus

Thanks, that was the solution I was looking for!

artelse avatar Sep 17 '21 09:09 artelse