[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to move point in emms playlist?
From: |
Tom |
Subject: |
How to move point in emms playlist? |
Date: |
Tue, 11 Jul 2023 18:36:56 +0200 |
User-agent: |
Mutt/2.2.7 (2022-08-07) |
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
--
- How to move point in emms playlist?,
Tom <=