--- Begin Message ---
Subject: |
Re: [Emms-patches] [PATCH] let emms-player-mpd support single track repeat. |
Date: |
Tue, 01 Sep 2009 02:23:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Michael Olson <address@hidden> writes:
> Can you refactor this in such a way that this new functionality is
> implemented in emms-player-mpd.el, instead of emms.el?
>
The function `emms-toggle-repeat-track' do nothing except change variable
`emms-repeat-track'. If don't redefine emms-toggle-repeat-track, it difficult
to find a way to inform mpd the repeat-track mode on or off.
And my patch have another problem. When mpd play the song once again in single
mode. emms-player-mpd can not detect it, and as a result, the lyric will not
reset. I even have not found out how emms-player-mpd detect next song event.
By The Way, recently emms-cache-set-from-mpd-all can not set the emacs-cache
correctly.
mpd versin: 0.15.1
> On Mon, Aug 31, 2009 at 4:12 AM, S.P.Tseng<address@hidden> wrote:
>> ---
>> lisp/emms.el | 7 ++++++-
>> 1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/lisp/emms.el b/lisp/emms.el
>> index 3c5402d..5fc1ab7 100644
>> --- a/lisp/emms.el
>> +++ b/lisp/emms.el
>> @@ -501,9 +501,14 @@ See `emms-repeat-playlist'."
>> See `emms-repeat-track'."
>> (interactive)
>> (setq emms-repeat-track (not emms-repeat-track))
>> + (when (equal (emms-player-for
>> + (emms-playlist-current-selected-track)) 'emms-player-mpd)
>> + (emms-player-mpd-send
>> + (concat "single " (if emms-repeat-track "1" "0"))
>> + nil #'ignore))
>> (if emms-repeat-track
>> (message "Will repeat the current track.")
>> - (message "Will advance to the next track after this one.")))
>> + (message "Will advance to the next track after this one.")))
>>
>> (defun emms-sort-track-name-less-p (a b)
>> "Return non-nil if the track name of A sorts before B."
>> --
>> 1.6.4.2
>>
>>
>>
>> _______________________________________________
>> Emms-patches mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emms-patches
>>
--
The opposite of love is not hate;
the opposite of love is solitude.
--- End Message ---