reddit / emacs

Emacs not loading ~/.config/emacs/init.el when first launched inside a distrobox container

BlondOlaf · 2022-10-05 14:05
Hi, I want to run emacs inside a development container (as I'm using Fedora Silverblue), but I'm having a weird issue: My config files are all in \~/.config/emacs/, but just after the launch of the container (distrobox-enter), emacs creates \~/.emacs and \~/.emacs.d and ignores the config folder. If I stop emacs, delete \~/.emacs and \~/.emacs.d and restart emacs, my init.el in \~/.config/emacs/ is considered and emacs starts configured the proper way. For now I think I will just move my config folder, but if you think this is an issue I might need to report on the mailing list, or if you can help me investigate a bit more, feel free to help me!
BlondOlaf · 2022-10-05 14:09
Ok, it seems that even .emacs.d is not taken into account and .emacs is created when first running emacs
BlondOlaf · 2022-10-05 14:39
After a bit more digging, the issue seems to come from distrobox, I'll try to ask on their bug tracker
alternateved · 2022-10-05 15:31
If you don't mind me asking, what would be your planned workflow with Emacs and Silverblue?
BlondOlaf · 2022-10-05 15:40
Emacs and every software I need for development inside a container, and a .desktop file to launch it from the desktop
alternateved · 2022-10-05 16:24
So the advantage of that would be to seperate development environment from the OS, right?
ZealousZera · 2022-10-06 07:05
I think in emacs you can view the load path. perhaps a file exists somewhere in that path already. if it exists, like ~/.emacs, the others arent loaded also run `echo "$XDG_CONFIG_DIR"` if it is not `<value of $HOME>/.config` that might be why it isnt loaded
BlondOlaf · 2022-10-26 08:36
For anyone using this post in the future, it is now fixed by the dev of distrobox: [https://github.com/89luca89/distrobox/issues/458](https://github.com/89luca89/distrobox/issues/458) It was caused by the fact that distrobox was copying content of /etc/skel (which contained a .emacs file) to the home directory if the files were not there