Discussion:
[emms-help] [PATCH] emms-player-mpd-ensure-process does not work on Win32
Oleg Kostyuchenko
2013-08-21 09:30:03 UTC
Permalink
Hi guys,

it seems that EMMS cannot interact with MPD out-of-the-box on a Windows
machine. My current setup consists of Windows 7, mpd-0.13.4, Emacs 24.3 and
the latest git snapshot of EMMS. When I open the EMMS buffer and execute
"emms-mpd-player-connect", it returns an error message "Unknown service:
6600". A quick research showed that emms-player-mpd-ensure-process expects
an integer for a port number but receives a string (e.g. "6600") instead.

After converting it to int, everything works OK. See the patch. Note that
this is just a hack and probably the real refactoring should be done
somewhere else.

Unfortunately, for now I have no *nix machine with the necessary setup to
test this case on it.

Oleg

diff --git a/lisp/emms-player-mpd.el b/lisp/emms-player-mpd.el
index 5744515..20ee70b 100644
--- a/lisp/emms-player-mpd.el
+++ b/lisp/emms-player-mpd.el
@@ -311,7 +311,7 @@ return at the end of a request.")
(funcall emms-player-mpd-connect-function "mpd"
nil
emms-player-mpd-server-name
- emms-player-mpd-server-port))
+ (string-to-int emms-player-mpd-server-port)))
(set-process-sentinel emms-player-mpd-process
'emms-player-mpd-sentinel)
(setq emms-player-mpd-queue

Loading...