From: Stefan Monnier Date: Tue, 8 Oct 2013 03:48:01 +0000 (-0400) Subject: * lisp/mpc.el (mpc-songs-jump-to): Adjust to different playlist format. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=442560600080f6131ec63956ed43eee7d26bf65a;p=emacs.git * lisp/mpc.el (mpc-songs-jump-to): Adjust to different playlist format. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d860498a10..db02ef7a67f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2013-10-08 Stefan Monnier + * mpc.el (mpc-songs-jump-to): Adjust to different playlist format. + * vc/pcvs.el: Use lexical-binding. (cvs-temp-buffer, cvs-make-cvs-buffer): Pass some vars in the lexical environment of `eval'. diff --git a/lisp/mpc.el b/lisp/mpc.el index 2bb3f91abc9..e07511c4f12 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -2009,7 +2009,9 @@ This is used so that they can be compared with `eq', which is needed for posn)))) (let* ((plbuf (mpc-proc-cmd "playlist")) (re (if song-file - (concat "^\\([0-9]+\\):" (regexp-quote song-file) "$"))) + ;; Newer MPCs apparently include "file: " in the buffer. + (concat "^\\([0-9]+\\):\\(?:file: \\)?" + (regexp-quote song-file) "$"))) (sn (with-current-buffer plbuf (goto-char (point-min)) (when (and re (re-search-forward re nil t))