radian-software / radian

🍉 Dotfiles that marry elegance and practicality.
MIT License
490 stars 47 forks source link

Using radian with chemacs. #440

Closed 4goodapp closed 5 years ago

4goodapp commented 5 years ago

I tried to use chemacs to test radian but it doesn't work. How to configure it with chemacs?

raxod502 commented 5 years ago

Have you followed the symlinking instructions in the README? I don't use this tool (Radian implements a profile switching system itself, by means of the USER_EMACS_DIRECTORY environment variable), but it seems like it should work fine to link the requisite Radian files into a separate directory to serve as user-emacs-directory, and then configure this directory for use with chemacs.

4goodapp commented 5 years ago

I just added the following:

(("default" . ((user-emacs-directory . "~/.emacs.d")))              ;; DoomEmacs, my default emacs
 ("prelude" . ((user-emacs-directory . "~/EMACS_CONFIGS/prelude"))) ;; Prelude
 ("spacemacs" . ((user-emacs-directory . "~/EMACS_CONFIGS/spacemacs/.emacs.d"))) ;; Spacemacs

 ("radian" . ((user-emacs-directory . "~/EMACS_CONFIGS/radian/emacs/"))) ;; radian. By Straight.el package maker.
 )

It usually works like this

I Changed this line too:

    (defvar radian-local-init-file "~/.emacs.d/init.local.el"
      "File for local customizations of Radian.")

to be:

    (defvar radian-local-init-file "~/EMACS_CONFIGS/radian/emacs/"
      "File for local customizations of Radian.")

but still having the same issue.

raxod502 commented 5 years ago

You need to follow the symlinking instructions in the README. The emacs subdirectory of this repository will not function as a user-emacs-directory. If you don't want to link the files directly into ~/.emacs.d, you need to create a new directory and link them into that directory, as per the instructions.

Separately, I have pushed a commit which makes sure that various other functions in Radian will function as desired with user-emacs-directory set to a nonstandard value.

4goodapp commented 5 years ago

Thanks for the support. You can close the issue. I test straight on my setup and it downloaded about 340mb of data by cloning repositories of each package I have on my init file, which is a very slow process unfortunately.

Off topic: What's the point of having Melpa in straight if download the repos of a package? why can't it just download directly from melpa? Is there an option for that? The only package I need for an external repos is Bookmark+. And straight download about 100mb of data for that package alone.

raxod502 commented 5 years ago

If you don't want to clone Git repositories, then it sounds like you don't want to use straight.el. The entire point of straight.el is to clone Git repositories. Downloading tarballs from MELPA is an antipattern given the design goals of straight.el and is completely unsupported.

But of course it also needs to clone MELPA. Otherwise how would it know where to find the Git repositories for packages?

4goodapp commented 5 years ago

Thanks for the explanation :)

raxod502 commented 5 years ago

See also https://github.com/raxod502/straight.el/issues/149 for improving performance of cloning Git repos initially.

4goodapp commented 5 years ago

Thanks :)

oatmealm commented 3 years ago

Can you explain how to set it up for chemacs 2.0 if possible? It occupies emacs.d. Iv'e tried this, but with the require init files symlinked into USER_EMACS_DIRECTORY

(("homebrew"    .  ((user-emacs-directory . "~/.config/emacs")))
 ("radian"      .  ((user-emacs-directory . "~/src/radian-emacs/emacs")
                    (env . (("USER_EMACS_DIRECTORY" . "~/.config/radian")))))
 ("doom"        .  ((user-emacs-directory . "~/src/doom-emacs")
                    (env . (("DOOMDIR" . "~/.config/doom"))))))

I'm getting:

error: Recursive load, /home/uri/.config/radian/init.el, /home/uri/.config/radian/init.el, /home/uri/.config/radian/init.el, /home/uri/.config/radian/init.el, /home/uri/.config/radian/init.el, /home/uri/src/radian-emacs/emacs/init.el, /home/uri/.emacs.d/init.el
raxod502 commented 3 years ago

I believe you would want to have ((user-emacs-directory . "~/.config/radian")) if that's where you are symlinking the dotfiles, no?

oatmealm commented 3 years ago

AFAIK user-emacs-directory is the base directory of the distribution itself ... I'm note sure then where to link my personal config files...

raxod502 commented 3 years ago

Radian expects to be symlinked, hence the recursive load error. If you don't want to symlink into ~/.emacs.d directly, e.g. because you're using chemacs, I would suggest creating a directory like ~/.config/radian, and then symlinking the Radian dotfiles into that directory. I.e.,

Then you would set user-emacs-directory to ~/.config/radian.