From b2ac5e98453572ab46f717804bdf79aab84286ee Mon Sep 17 00:00:00 2001 From: forcer Date: Thu, 22 Sep 2005 18:46:00 +0000 Subject: emms-info-mp3info: Provide a way to configure the mp3info output coding system. darcs-hash:20050922184657-2189f-122182bd8d0dbb1f966161be07d1c03b121591b1.gz --- emms-info-mp3info.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'emms-info-mp3info.el') diff --git a/emms-info-mp3info.el b/emms-info-mp3info.el index cf94a43..2f7bd59 100644 --- a/emms-info-mp3info.el +++ b/emms-info-mp3info.el @@ -44,6 +44,11 @@ external mp3info program" :group 'emms-info) +(defcustom emms-info-mp3info-coding-system 'latin-1 + "*Coding system used in the output of mp3info." + :type 'coding-system + :group 'emms-info-mp3info) + (defcustom emms-info-mp3info-program-name "mp3info" "*The name/path of the mp3info tag program." :type 'string @@ -69,11 +74,13 @@ This is a useful element for `emms-info-functions'." (when (and (eq 'file (emms-track-type track)) (string-match "\\.[Mm][Pp]3\\'" (emms-track-name track))) (with-temp-buffer - (when (zerop (apply 'call-process - emms-info-mp3info-program-name - nil t nil - (emms-track-name track) - emms-info-mp3find-arguments)) + (when (zerop + (let ((coding-system-for-read emms-info-mp3info-coding-system)) + (apply 'call-process + emms-info-mp3info-program-name + nil t nil + (emms-track-name track) + emms-info-mp3find-arguments))) (goto-char (point-min)) (while (looking-at "^\\([^=]+\\)=\\(.*\\)$") (let ((name (intern (match-string 1))) -- cgit v1.2.3