Re: How to move point in emms playlist?

Yuchen Pei <[email protected]>
Newsgroups gmane.emacs.emms.user
Message-ID <[email protected]>
Does the command emms-playlist-mode-center-current (bound to the c key by default) that teleports point to the currently playing track help?

On 12 July 2023 02:36:56 GMT+10:00, Tom via <[email protected]> wrote:
>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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.