pft / mingus

GNU Emacs control of Music Player Daemon (MPD)
104 stars 19 forks source link

Running mingus-browse does not trigger mingus-browse-hooks #23

Closed Northcode closed 8 years ago

Northcode commented 8 years ago

Tested with package version 20160321.917 from melpa.

Also setting any mingus modes in evil-emacs-state-modes does not seem to work

pft commented 8 years ago

Hi Northcode,

You should look for mingus-browse-hook', i.e. singular, notmingus-browse-hooks'. I realise there is an inconsistency here with `mingus-playlist-hooks'.

Actually, mingus-browse-mode-hook' andmingus-playlist-mode-hook' would be more apt names, consistent with other packages. Also mingus-help-mode' andmingus-burn-mode' do not even run a hook.

I'll think about renaming/deprecating/adding hooks.

NOTE by the way that these mode functions might be used more often than strictly necessary, so tread carefully if you do not want your hook functions to run too often.

Northcode commented 8 years ago

Ah, thanks. For some reason company only suggested the hooks version.
I need the hooks because adding mingus modes to the evil-emacs-state-modes list didn't make them start in emacs mode instead of normal mode (I.E no keybinds work properly), maybe theres something about how you load modes or something. Anyway so the hooks Im calling shouldn't be very expensive as they are just changing evil states.

And yes, looking into renaming them seems like a good idea ;)