Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smuge-controller doesn't seem to be defined until I run some command #82

Open
alexsieusahai opened this issue Jan 27, 2022 · 4 comments

Comments

@alexsieusahai
Copy link

Hi, great package, mostly no hiccups.

I'm using basically a vanilla spacemacs on the current develop branch.

I totally apologize if I'm missing something obvious btw

I'm trying to rebind stuff like this:

;; keybinds
(with-eval-after-load 'evil
  ;; prev / next
  ;; note; these will return 403 errors if the query doesn't make logical sense;
  ;; if there's nothing previous (like if you selected a track), then it'll return a 403
  (define-key evil-normal-state-local-map (kbd "SPC m j") 'smudge-controller-next-track)
  (define-key evil-normal-state-local-map (kbd "SPC m k") 'smudge-controller-previous-track)

  ;; search
  (define-key evil-normal-state-local-map (kbd "SPC m t /") 'smudge-track-search)
  (define-key evil-normal-state-local-map (kbd "SPC m l /") 'smudge-my-playlists)
  (define-key evil-normal-state-local-map (kbd "SPC m l /") 'smudge-playlist-load-more)

  ;; volume
  (define-key evil-normal-state-local-map (kbd "SPC m v k") 'smudge-controller-volume-up)
  (define-key evil-normal-state-local-map (kbd "SPC m v j") 'smudge-controller-volume-down)

  ;; various toggles
  (define-key evil-normal-state-local-map (kbd "SPC m t p") 'smudge-controller-toggle-play)
  (define-key evil-normal-state-local-map (kbd "SPC m t s") 'smudge-controller-toggle-shuffle)
  (define-key evil-normal-state-local-map (kbd "SPC m t r") 'smudge-controller-toggle-repeat))

But nothing seems to be defined (Symbol's function definition is void: smudge-controller-next-track if I try to eval (smudge-controler-next-track), for example), at least until I run some command, like (smudge-my-playlists).

Indeed, if I append (smudge-my-playlists) to the above keybinds snippet, everything loads fine...

Any idea why this might be the case?

@alexsieusahai
Copy link
Author

Btw, my super ugly bandaid fix is just do this

(smudge-my-playlists)
(sleep-for 1)
(kill-buffer "*Playlists: <acc_name>*")

before running the above snippet, if anyone else stumbles upon this and doesn't mind a poor fix in the meanwhile.

@sjhuang26
Copy link

I have encountered the same issue on Spacemacs.

@magicaldave
Copy link

This package does NOT play nice with Spacemacs' lazy loading.
Doing a manual install should fix this issue, as it did for me.

@danielfm
Copy link
Owner

danielfm commented Dec 5, 2023

I only tested this with Doom and in my old vanilla Emacs dotfiles. So if any Spacemacs user is willing to contribute a fix, I will get it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants