How to move point in emms playlist?
Tom via <[email protected]>
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I am always a little irritated that the currently playing track is not at point (I'm using hl-line-mode), so there are 2 highlighted lines, point and current track. I wanted to fix that with:
(defun tvd-emms-follow-playing-song()
(interactive)
(save-restriction
(when emms-playlist-selected-marker
(goto-char emms-playlist-selected-marker))))
(add-hook 'emms-playlist-selection-changed-hook 'tvd-emms-follow-playing-song 1)
However, this doesn't work, point is not moved when a new song starts to play.
When I execute the function manually, it works (I added a couple of print statements to the function, which are being executed every time the song changes). So, it's actually being executed by the hook, but the goto-char part doesn't have any effect.
Does anyone have an idea what might be wrong here?
Many thanks in advance,
Tom
--