This is similar to this question but the answer there seems to be deprecated.
Let's say I'm using a layer and want hack the code of a particular package that layer is using. How do I go about it?
To better illustrate what I want to accomplish in general, I present a specific example.
I try to get the spotify
layer to work, but the current master
branch in the helm-spotify
package uses a deprecated web API. There is a pull request to fix this and I want to try it and maybe contribute something. My problem is, that I can not get the local copy of helm-spotify
to load.
What I tried was to switch to the develop
branch of spacemacs
:
git branch --track develop origin/develop
git checkout develop
In ~/.emacs.d/layers/spotify/packages.el
I changed from
(setq spotify-packages '(spotify helm-spotify))
To
(setq spotify-packages
'(
spotify
(helm-spotify :location local)
))
And pulled the helm-spotify
repository to ~/.emacs.d/layers/spotify/local/helm-spotify
When I restart spacemacs I get
File error: Cannot open load file, no such file or directory, multi
In when I look into helm-spotify.el
there is:
(require 'multi)
So my guess is, that when installing helm-spotify
from melpa
the dependency on multi
gets resolved prior to loading helm-spotify
but of course not anymore when I use a local copy of helm-spotify
.
So my questions are:
- How do resolve dependencies when using a local package?
- Or should I do this completely differently from what I described?
I also tried, without success, to add multi
to dotspacemacs-additional-packages
and to spotify-packages
:
(setq spotify-packages '(
multi ;; I added this
spotify
(helm-spotify :location local) ;; I modified here
))
;; I added this
(defun spotify/init-multi ()
(use-package multi))
;; the rest is as it was
(defun spotify/init-spotify ()
(use-package spotify
:config (spacemacs/set-leader-keys
"amsp" 'spotify-playpause
"amsn" 'spotify-next
"amsN" 'spotify-previous
"amsQ" 'spotify-quit)))
(when (configuration-layer/layer-usedp 'spacemacs-helm)
(defun spotify/init-helm-spotify ()
(use-package helm-spotify
:config (spacemacs/set-leader-keys
"amsg" 'helm-spotify))))
in packages.el
. Also tried without adding multi
to dotspacemacs-additional-packages
.