From 442560600080f6131ec63956ed43eee7d26bf65a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 7 Oct 2013 23:48:01 -0400 Subject: [PATCH] * lisp/mpc.el (mpc-songs-jump-to): Adjust to different playlist format. --- lisp/ChangeLog | 2 ++ lisp/mpc.el | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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)) -- 2.39.2