plexus / chemacs

Emacs profile switcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Spac)emacs uses packages from wrong profile

dalanicolai opened this issue · comments

Although I am reporting this issue, I do not know what exactly causes it. I hope you might have some idea.

I am using Spacemacs with chemacs, and my .emacs-profiles.el looks as follows,

(("default"   . ((user-emacs-directory . "~/.emacs.d")))
 ("spacemacs" . ((user-emacs-directory . "~/spacemacs")
		 (server-name . "spacemacs")
		 (env . (("SPACEMACSDIR" . "~/.spacemacs.d"))))))

Now I am using Spacemacs with ivy (incl counsel and swiper). Spacemacs installs these packages in a subdirectory of ~/spacemacs/elpa. Now I wanted to do some debugging in Ivy, so I opened vanilla Emacs and installed counsel from GNU ELPA there. However, this action resulted in Spacemacs showing the error ivy-read: Symbol’s function definition is void: counsel-recentf-candidates when trying to use e.g. spacemacs/counsel-recentf.

Indeed, when I use spacemacs/jump-to-definition to jump to the definition of spacemacs/counsel-recentf, I end up in the counsel.el file in the .emacs.d directory (while Spacemacs should be using the counsel.el in my ~/spacemacs directory). The value of my user-emacs-directory in Spacemacs is ~/spacemacs/.

Now I am not sure, which part (chemacs, emacs, spacemacs or the counsel package) is responsible for deciding which package (directory) to use. So I just report it here, because this bug will only show up when using multiple configurations.