[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] about emms-player-finished-hook
From: |
William Xu |
Subject: |
[emms-help] about emms-player-finished-hook |
Date: |
Sun, 13 Aug 2006 23:39:10 +0800 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Hi all,
I've found out the cause of a weird bug that has annoyed me for
long. The bug is that after enabling playing-time, lyrics, mode-line
modules, it's expected that some track info will be shown on the mode
line, but they disappear !
Looking at emms-player-finished-hook, here its value is,
'(emms-mode-line-blank emms-next-noerror emms-playing-time-stop
emms-lyrics-stop)
This bug is caused by the running squence of these functions. Generally,
when the player finishes a track, we'll restore mode line
info; meanwhile, when the player starts playing next track(invoked by
emms-next-noerror here), the above modules will setup new track's info
on mode line. So the bug arises.
Maybe emms-next-noerror is *not* "a good function to put in
`emms-player-finished-hook'." now? I suggest we directly call it after
emms-player-finished-hook?
(defun emms-player-stopped ()
"Declare that the current EMMS player is finished.
This should only be done by the current player itself."
(setq emms-player-playing-p nil)
(if emms-player-stopped-p
(run-hooks 'emms-player-stopped-hook)
(sleep-for emms-player-delay)
(run-hooks 'emms-player-finished-hook)
(emms-next-noerror)))
--
William
Your wise men don't know how it feels
To be thick as a brick.
-- Jethro Tull, "Thick As A Brick"
- [emms-help] about emms-player-finished-hook,
William Xu <=