emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] darcs patch: emms-player-mpd: Major rewrite to use a ...


From: Michael Olson
Subject: [Emms-patches] darcs patch: emms-player-mpd: Major rewrite to use a ... (and 5 more)
Date: Mon, 10 Apr 2006 23:36:47 -0400

Mon Apr 10 20:43:45 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: Major rewrite to use a custom transaction queue 
implementation, which includes adjusting most functions to use callbacks and 
closures.

Mon Apr 10 21:39:42 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: A few minor tweaks.

Mon Apr 10 22:59:31 EDT 2006  Michael Olson <address@hidden>
  * emms-playlist-mode: Fix a bug where too many overlays were being added when 
the track was updated.

Mon Apr 10 23:00:23 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: Reset some extra state data on stop.

Mon Apr 10 23:05:39 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: Remove obsolete option.

Mon Apr 10 23:35:52 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: Make sure inserted text from emms-player-mpd-show goes to 
the right buffer.
New patches:

[emms-player-mpd: Major rewrite to use a custom transaction queue 
implementation, which includes adjusting most functions to use callbacks and 
closures.
Michael Olson <address@hidden>**20060411004345] {
hunk ./emms-player-mpd.el 93
-(require 'emms-source-playlist) ; for emms-source-file-parse-playlist
+(require 'emms-source-playlist)  ; for emms-source-file-parse-playlist
hunk ./emms-player-mpd.el 206
+;;; Traffic Queue (with some improvements) based on tq.el
+
+(defun emms-player-mpd-tq-create (process)
+  "Create and return a transaction queue communicating with PROCESS.
+PROCESS should be a subprocess capable of sending and receiving
+streams of bytes.  It may be a local process, or it may be connected
+to a tcp server on another machine."
+  (let ((tq (cons nil (cons process
+                            (generate-new-buffer
+                             (concat " emms-player-mpd-tq-temp-"
+                                     (process-name process)))))))
+    (set-process-filter process
+                        `(lambda (proc string)
+                           (emms-player-mpd-tq-filter ',tq string)))
+    tq))
+
+;; accessors
+(defun emms-player-mpd-tq-queue (tq)
+  (car tq))
+(defun emms-player-mpd-tq-process (tq)
+  (car (cdr tq)))
+(defun emms-player-mpd-tq-buffer (tq)
+  (cdr (cdr tq)))
+(defun emms-player-mpd-tq-queue-head-question (tq)
+  (car (car (emms-player-mpd-tq-queue tq))))
+(defun emms-player-mpd-tq-queue-head-regexp (tq)
+  (car (cdr (car (emms-player-mpd-tq-queue tq)))))
+(defun emms-player-mpd-tq-queue-head-closure (tq)
+  (car (cdr (cdr (car (emms-player-mpd-tq-queue tq))))))
+(defun emms-player-mpd-tq-queue-head-fn (tq)
+  (cdr (cdr (cdr (car (emms-player-mpd-tq-queue tq))))))
+
+(defun emms-player-mpd-tq-queue-empty (tq)
+  (not (emms-player-mpd-tq-queue tq)))
+
+(defun emms-player-mpd-tq-queue-add (tq question re closure fn)
+  (setcar tq (nconc (emms-player-mpd-tq-queue tq)
+                    (cons (cons question (cons re (cons closure fn))) nil)))
+  'ok)
+
+(defun emms-player-mpd-tq-queue-pop (tq)
+  (setcar tq (cdr (car tq)))
+  (let ((question (emms-player-mpd-tq-queue-head-question tq)))
+    (when question
+      (process-send-string (emms-player-mpd-tq-process tq) question)))
+  (null (car tq)))
+
+(defun emms-player-mpd-tq-enqueue (tq question regexp closure fn)
+  "Add a transaction to transaction queue TQ.
+This sends the string QUESTION to the process that TQ communicates with.
+When the corresponding answer comes back, we call FN
+with two arguments: CLOSURE, and the answer to the question.
+REGEXP is a regular expression to match the entire answer;
+that's how we tell where the answer ends."
+  (let ((sendp (not (emms-player-mpd-tq-queue-head-question tq))))
+    (emms-player-mpd-tq-queue-add tq question regexp closure fn)
+    (when sendp
+      (process-send-string (emms-player-mpd-tq-process tq) question))))
+
+(defun emms-player-mpd-tq-close (tq)
+  "Shut down transaction queue TQ, terminating the process."
+  (delete-process (emms-player-mpd-tq-process tq))
+  (kill-buffer (emms-player-mpd-tq-buffer tq)))
+
+(defun emms-player-mpd-tq-filter (tq string)
+  "Append STRING to the TQ's buffer; then process the new data."
+  (with-current-buffer (emms-player-mpd-tq-buffer tq)
+    (goto-char (point-max))
+    (insert string)
+    (emms-player-mpd-tq-process-buffer tq)))
+
+(defun emms-player-mpd-tq-process-buffer (tq)
+  "Check TQ's buffer for the regexp at the head of the queue."
+  (set-buffer (emms-player-mpd-tq-buffer tq))
+  (if (= 0 (buffer-size)) ()
+    (if (emms-player-mpd-tq-queue-empty tq)
+        (let ((buf (generate-new-buffer "*spurious*")))
+          (copy-to-buffer buf (point-min) (point-max))
+          (delete-region (point-min) (point))
+          (pop-to-buffer buf nil)
+          (error "Spurious communication from process %s, see buffer %s"
+                 (process-name (emms-player-mpd-tq-process tq))
+                 (buffer-name buf)))
+      (goto-char (point-min))
+      (if (re-search-forward (emms-player-mpd-tq-queue-head-regexp tq) nil t)
+          (let ((answer (buffer-substring (point-min) (point))))
+            (delete-region (point-min) (point))
+            (unwind-protect
+                (condition-case nil
+                    (funcall (emms-player-mpd-tq-queue-head-fn tq)
+                             (emms-player-mpd-tq-queue-head-closure tq)
+                             answer)
+                  (error nil))
+              (emms-player-mpd-tq-queue-pop tq))
+            (emms-player-mpd-tq-process-buffer tq))))))
+
hunk ./emms-player-mpd.el 304
-(defvar emms-player-mpd-blocked nil)
hunk ./emms-player-mpd.el 305
-(defvar emms-player-mpd-returned-data nil)
+(defvar emms-player-mpd-queue nil)
hunk ./emms-player-mpd.el 313
+(defvar emms-player-mpd-status-regexp
+  "^\\(OK\\( MPD \\)?\\|ACK \\[\\([0-9]+\\)@[0-9]+\\] \\(.+\\)\\)\n+\\'"
+  "Regexp that matches the valid status strings that MusicPD can
+return at the end of a request.")
+
hunk ./emms-player-mpd.el 324
+           (emms-player-mpd-tq-close emms-player-mpd-queue)
+           (setq emms-player-mpd-queue nil)
hunk ./emms-player-mpd.el 334
-(defun emms-player-mpd-filter (proc string)
-  "The process filter for MusicPD."
-  (setq emms-player-mpd-returned-data string))
-
hunk ./emms-player-mpd.el 346
-    (set-process-filter emms-player-mpd-process
-                        'emms-player-mpd-filter)
+    (setq emms-player-mpd-queue
+          (emms-player-mpd-tq-create emms-player-mpd-process))
hunk ./emms-player-mpd.el 350
-      (process-kill-without-query emms-player-mpd-process))
-    ;; wait a bit for the process to finish starting, as it likes to
-    ;; send us an "OK" message initially
-    (accept-process-output emms-player-mpd-process 0 200)))
+      (process-kill-without-query emms-player-mpd-process))))
hunk ./emms-player-mpd.el 352
-(defun emms-player-mpd-block ()
-  "Block input for MusicPD, waiting if currently blocked.
-The maximum amount is determined by `emms-player-mpd-timeout'."
-  (with-timeout (emms-player-mpd-timeout)
-    (while emms-player-mpd-blocked
-      (sit-for 0.20)))
-  (setq emms-player-mpd-blocked t))
-
-(defun emms-player-mpd-unblock ()
-  "Unblock input for MusicPD."
-  (setq emms-player-mpd-blocked nil))
-
-(defun emms-player-mpd-send (command)
-  "Send the given COMMAND to the MusicPD server and await a response,
-which is returned."
+(defun emms-player-mpd-send (question closure fn)
+  "Send the given QUESTION to the MusicPD server.
+When a reply comes, call FN with CLOSURE and the result."
hunk ./emms-player-mpd.el 356
-  (unless (string= (substring command -1) "\n")
-    (setq command (concat command "\n")))
-  (let (response)
-    (unwind-protect
-        (progn
-          (emms-player-mpd-block)
-          (setq emms-player-mpd-returned-data nil)
-          (process-send-string emms-player-mpd-process command)
-          (accept-process-output emms-player-mpd-process
-                                 emms-player-mpd-timeout))
-      (setq response emms-player-mpd-returned-data)
-      (emms-player-mpd-unblock))
-    response))
+  (unless (string= (substring question -1) "\n")
+    (setq question (concat question "\n")))
+  (emms-player-mpd-tq-enqueue emms-player-mpd-queue question
+                              emms-player-mpd-status-regexp
+                              closure fn))
hunk ./emms-player-mpd.el 378
-        (when (string-match "^OK\\( MPD \\)?" (car data))
+        (when (and (stringp (car data))
+                   (string-match "^OK\\( MPD \\)?" (car data)))
hunk ./emms-player-mpd.el 381
-        (if (string-match "^ACK \\[\\([0-9]+\\)@[0-9]+\\] \\(.+\\)" status)
+        (if (and (stringp status)
+                 (string-match "^ACK \\[\\([0-9]+\\)@[0-9]+\\] \\(.+\\)"
+                               status))
hunk ./emms-player-mpd.el 437
-(defun emms-player-mpd-get-tracks ()
-  "Get the current playlist from MusicPD in the form of a list of
-EMMS tracks."
+(defun emms-player-mpd-get-tracks-1 (closure response)
hunk ./emms-player-mpd.el 439
-                (emms-player-mpd-parse-response
-                 (emms-player-mpd-send "playlistinfo"))))
+                (emms-player-mpd-parse-response response)))
hunk ./emms-player-mpd.el 447
-              (setq tracks (cons track tracks))))))
-      tracks)))
+              (setq tracks (cons track tracks)))))))
+    (funcall (car closure) (cdr closure) tracks)))
+
+(defun emms-player-mpd-get-tracks (closure callback)
+  "Get the current playlist from MusicPD in the form of a list of
+EMMS tracks.
+Call CALLBACK with CLOSURE and result when the request is complete."
+  (emms-player-mpd-send "playlistinfo" (cons callback closure)
+                        #'emms-player-mpd-get-tracks-1))
+
+(defun emms-player-mpd-get-status-1 (closure response)
+  (funcall (car closure)
+           (cdr closure)
+           (emms-player-mpd-get-alist
+            (emms-player-mpd-parse-response response))))
hunk ./emms-player-mpd.el 463
-(defun emms-player-mpd-get-status ()
+(defun emms-player-mpd-get-status (closure callback)
hunk ./emms-player-mpd.el 465
-It will be returned in the form of an alist."
-  (emms-player-mpd-get-alist
-   (emms-player-mpd-parse-response
-    (emms-player-mpd-send "status"))))
+It will be returned in the form of an alist by calling CALLBACK
+with CLOSURE as its first argument, and the status as the
+second."
+  (emms-player-mpd-send "status" (cons callback closure)
+                        #'emms-player-mpd-get-status-1))
hunk ./emms-player-mpd.el 471
-(defun emms-player-mpd-get-playlist-id (&optional info)
+(defun emms-player-mpd-get-status-part (closure callback item &optional info)
+  "Get ITEM from the current MusicPD status.
+Call CALLBACK with CLOSURE and result when the request is complete.
+If INFO is specified, use that instead of acquiring the necessary
+info from MusicPD."
+  (if info
+      (funcall callback closure (cdr (assoc item info)))
+    (emms-player-mpd-get-status
+     (cons callback (cons closure item))
+     (lambda (closure info)
+       (let ((fn (car closure))
+             (close (cadr closure))
+             (item (cddr closure)))
+         (funcall fn close (cdr (assoc item info))))))))
+
+(defun emms-player-mpd-get-playlist-id (closure callback &optional info)
hunk ./emms-player-mpd.el 488
+Call CALLBACK with CLOSURE and result when the request is complete.
hunk ./emms-player-mpd.el 491
-  (unless info
-    (setq info (emms-player-mpd-get-status)))
-  (cdr (assoc "playlist" info)))
+  (when info
+    (setq callback (lambda (closure id) id)))
+  (emms-player-mpd-get-status-part closure callback "playlist" info))
hunk ./emms-player-mpd.el 495
-(defun emms-player-mpd-get-current-song (&optional info)
+(defun emms-player-mpd-get-current-song (closure callback &optional info)
hunk ./emms-player-mpd.el 500
+Call CALLBACK with CLOSURE and result when the request is complete.
hunk ./emms-player-mpd.el 503
-  (unless info
-    (setq info (emms-player-mpd-get-status)))
-  (cdr (assoc "song" info)))
+  (when info
+    (setq callback (lambda (closure id) id)))
+  (emms-player-mpd-get-status-part closure callback "song" info))
hunk ./emms-player-mpd.el 507
-(defun emms-player-mpd-get-state (&optional info)
+(defun emms-player-mpd-get-mpd-state (closure callback &optional info)
hunk ./emms-player-mpd.el 511
+Call CALLBACK with CLOSURE and result when the request is complete.
hunk ./emms-player-mpd.el 514
-  (unless info
-    (setq info (emms-player-mpd-get-status)))
-  (cdr (assoc "state" info)))
+  (when info
+    (setq callback (lambda (closure id) id)))
+  (emms-player-mpd-get-status-part closure callback "state" info))
hunk ./emms-player-mpd.el 518
-(defun emms-player-mpd-get-playing-time (&optional info)
+(defun emms-player-mpd-get-playing-time (closure callback &optional info)
hunk ./emms-player-mpd.el 522
+Call CALLBACK with CLOSURE and result when the request is complete.
hunk ./emms-player-mpd.el 525
-  (unless info
-    (setq info (emms-player-mpd-get-status)))
-  (let ((time (cdr (assoc "time" info))))
-    (when (and time
-               (string-match "\\`\\([0-9]+\\):" time))
-      (string-to-number (match-string 1 time)))))
+  (if info
+      (emms-player-mpd-get-status-part
+       nil
+       (lambda (closure time)
+         (and time
+              (string-match "\\`\\([0-9]+\\):" time)
+              (string-to-number (match-string 1 time))))
+       "time" info)
+    (emms-player-mpd-get-status-part
+     (cons callback closure)
+     (lambda (closure time)
+       (funcall (car closure)
+                (cdr closure)
+                (and time
+                     (string-match "\\`\\([0-9]+\\):" time)
+                     (string-to-number (match-string 1 time)))))
+     "time" info)))
+
+(defun emms-player-mpd-sync-from-emms-1 (closure id)
+  (let ((buffer (car closure))
+        (fn (cadr closure))
+        (close (cddr closure)))
+    (when (buffer-live-p buffer)
+      (with-current-buffer buffer
+        (setq emms-player-mpd-playlist-id id))
+      (when (functionp fn)
+        (funcall fn close)))))
hunk ./emms-player-mpd.el 553
-(defun emms-player-mpd-sync-from-emms ()
+(defun emms-player-mpd-sync-from-emms (&optional closure callback)
hunk ./emms-player-mpd.el 555
-current EMMS playlist."
+current EMMS playlist.
+If CALLBACK is provided, call it with CLOSURE once we are done."
hunk ./emms-player-mpd.el 559
-   (save-excursion
-     (mapc #'emms-player-mpd-add
-           (nreverse
-            (emms-playlist-tracks-in-region (point-min) (point-max)))))
-   (setq emms-player-mpd-playlist-id (emms-player-mpd-get-playlist-id))))
+    (save-excursion
+      (mapc #'emms-player-mpd-add
+            (nreverse
+             (emms-playlist-tracks-in-region (point-min) (point-max)))))
+    (emms-player-mpd-get-playlist-id
+     (cons (current-buffer) (cons callback closure))
+     #'emms-player-mpd-sync-from-emms-1)))
+
+(defun emms-player-mpd-sync-from-mpd-2 (closure info)
+  (let ((buffer (car closure))
+        (fn (cadr closure))
+        (close (cddr closure))
+        (id (emms-player-mpd-get-playlist-id nil #'ignore info))
+        (song (emms-player-mpd-get-current-song nil #'ignore info)))
+    (when (buffer-live-p buffer)
+      (let ((emms-playlist-buffer buffer))
+        (with-current-emms-playlist
+          (setq emms-player-mpd-playlist-id id)
+          (if song
+              (progn
+                (goto-line (1+ (string-to-number song)))
+                (emms-playlist-select (point)))
+            (goto-char (point-min)))))
+      (when (functionp fn)
+        (funcall fn close info)))))
hunk ./emms-player-mpd.el 585
-(defun emms-player-mpd-sync-from-mpd ()
+(defun emms-player-mpd-sync-from-mpd-1 (closure tracks)
+  (let ((buffer (car closure)))
+    (when (and tracks
+               (buffer-live-p buffer))
+      (let ((emms-playlist-buffer buffer))
+        (with-current-emms-playlist
+          (emms-playlist-clear)
+          (mapc #'emms-playlist-insert-track tracks)))
+      (emms-player-mpd-get-status closure
+                                  #'emms-player-mpd-sync-from-mpd-2))))
+
+(defun emms-player-mpd-sync-from-mpd (&optional closure callback)
hunk ./emms-player-mpd.el 600
-    (emms-playlist-clear)
-    (mapc #'emms-playlist-insert-track (emms-player-mpd-get-tracks))
-    (let* ((info (emms-player-mpd-get-status))
-           (id (emms-player-mpd-get-playlist-id info))
-           (song (emms-player-mpd-get-current-song info)))
-      (setq emms-player-mpd-playlist-id id)
-      (if song
-          (progn
-            (goto-line (1+ (string-to-number song)))
-            (emms-playlist-select (point)))
-        (goto-char (point-min))))))
+    (emms-player-mpd-get-tracks
+     (cons emms-playlist-buffer (cons callback closure))
+     #'emms-player-mpd-sync-from-mpd-1)))
hunk ./emms-player-mpd.el 604
-(defun emms-player-mpd-detect-song-change (&optional info)
-  "Detect whether a song change has occurred.
-This is usually called by a timer.
-
-If INFO is specified, use that instead of acquiring the necessary
-info from MusicPD."
-  (unless info
-    (setq info (emms-player-mpd-get-status)))
-  (let ((song (emms-player-mpd-get-current-song info))
-        (status (emms-player-mpd-get-state info))
-        (time (emms-player-mpd-get-playing-time info)))
+(defun emms-player-mpd-detect-song-change-1 (closure info)
+  (let ((song (emms-player-mpd-get-current-song nil #'ignore info))
+        (status (emms-player-mpd-get-mpd-state nil #'ignore info))
+        (time (emms-player-mpd-get-playing-time nil #'ignore info)))
hunk ./emms-player-mpd.el 609
-           (emms-cancel-timer emms-player-mpd-status-timer)
-           (setq emms-player-mpd-status-timer nil)
-           (emms-player-stopped))
+           (emms-player-mpd-stop t))
hunk ./emms-player-mpd.el 626
+(defun emms-player-mpd-detect-song-change (&optional info)
+  "Detect whether a song change has occurred.
+This is usually called by a timer.
+
+If INFO is specified, use that instead of acquiring the necessary
+info from MusicPD."
+  (if info
+      (emms-player-mpd-detect-song-change-1 nil info)
+    (emms-player-mpd-get-status nil #'emms-player-mpd-detect-song-change-1)))
+
hunk ./emms-player-mpd.el 657
-  (emms-player-mpd-send "clear"))
+  (when emms-player-mpd-status-timer
+    (emms-cancel-timer emms-player-mpd-status-timer)
+    (setq emms-player-mpd-status-timer nil))
+  (emms-player-mpd-send "clear" nil #'ignore))
hunk ./emms-player-mpd.el 664
-If we succeed in adding the file, return non-nil, nil otherwise."
+If an error occurs, display a relevant message."
hunk ./emms-player-mpd.el 666
-  (let ((output (emms-player-mpd-parse-response
-                 (emms-player-mpd-send
-                  (concat "add " (emms-player-mpd-quote-file file))))))
-    (if (car output)
-        (progn
-          (when emms-player-mpd-verbose
-            (message "MusicPD error: %s: %s" file (cdar output)))
-          nil)
-      t)))
+  (emms-player-mpd-send
+   (concat "add " (emms-player-mpd-quote-file file))
+   file
+   (lambda (file response)
+     (let ((output (emms-player-mpd-parse-response response)))
+       (when (car output)
+         (message "MusicPD error: %s: %s" file (cdar output)))))))
hunk ./emms-player-mpd.el 683
-        (let ((list (emms-source-playlist-files format))
-              (any-success nil))
+        (let ((list (emms-source-playlist-files format)))
hunk ./emms-player-mpd.el 685
-            (when (emms-player-mpd-add-file file)
-              (setq any-success t)))
-          any-success)))))
+            (emms-player-mpd-add-file file)))))))
hunk ./emms-player-mpd.el 707
-(defun emms-player-mpd-play (&optional id)
+(defun emms-player-mpd-play (&optional id closure)
hunk ./emms-player-mpd.el 715
-        (emms-player-mpd-send (concat "play " id))
-        (setq emms-player-mpd-current-song id))
-    (emms-player-mpd-send "play")))
-
-(defun emms-player-mpd-start-and-sync (track)
-  "Starts a process playing TRACK.
-This is called if `emms-player-mpd-sync-playlist' is non-nil.
+        (emms-player-mpd-send
+         (concat "play " id)
+         nil
+         (lambda (closure response)
+           (setq emms-player-mpd-current-song id)
+           (setq emms-player-mpd-status-timer
+                 (run-at-time t emms-player-mpd-check-interval
+                              'emms-player-mpd-detect-song-change)))))
+    (emms-player-mpd-send
+     "play"
+     nil
+     (lambda (start-timer response)
+       (setq emms-player-mpd-status-timer
+             (run-at-time t emms-player-mpd-check-interval
+                          'emms-player-mpd-detect-song-change))))))
hunk ./emms-player-mpd.el 731
-It ensures that MusicPD's playlist is up-to-date with EMMS's
-playlist, and then plays the current track."
-  (let ((id (emms-player-mpd-get-playlist-id)))
-    (unless (and (stringp emms-player-mpd-playlist-id)
-                 (string= emms-player-mpd-playlist-id id))
-      (emms-player-mpd-sync-from-emms))
-    (with-current-emms-playlist
-      (emms-player-mpd-play (1- (line-number-at-pos
-                                 emms-playlist-selected-marker)))))
-  (when emms-player-mpd-status-timer
-    (emms-cancel-timer emms-player-mpd-status-timer))
-  (setq emms-player-mpd-status-timer
-        (run-at-time t emms-player-mpd-check-interval
-                     'emms-player-mpd-detect-song-change)))
-
-;;;###autoload
-(defun emms-player-mpd-connect ()
-  "Connect to MusicPD and retrieve its current playlist.
-Afterward, the status of MusicPD will be tracked."
-  (interactive)
+(defun emms-player-mpd-start-and-sync-1 (buffer)
hunk ./emms-player-mpd.el 735
-  (emms-player-mpd-sync-from-mpd)
+  (let ((emms-playlist-buffer buffer))
+    (with-current-emms-playlist
+      (emms-player-mpd-play (1- (line-number-at-pos
+                                 emms-playlist-selected-marker))))))
+
+(defun emms-player-mpd-start-and-sync ()
+  "Ensure that MusicPD's playlist is up-to-date with EMMS's
+playlist, and then play the current track.
+
+This is called if `emms-player-mpd-sync-playlist' is non-nil."
+  (emms-player-mpd-get-playlist-id
+   nil
+   (lambda (closure id)
+     (if (and (stringp emms-player-mpd-playlist-id)
+              (string= emms-player-mpd-playlist-id id))
+         (emms-player-mpd-start-and-sync-1 emms-playlist-buffer)
+       (emms-player-mpd-sync-from-emms
+        emms-playlist-buffer
+        #'emms-player-mpd-start-and-sync-1)))))
+
+(defun emms-player-mpd-connect-1 (closure info)
hunk ./emms-player-mpd.el 757
-  (let* ((info (emms-player-mpd-get-status))
-         (state (emms-player-mpd-get-state info)))
+  (let* ((state (emms-player-mpd-get-mpd-state nil #'ignore info)))
hunk ./emms-player-mpd.el 768
+;;;###autoload
+(defun emms-player-mpd-connect ()
+  "Connect to MusicPD and retrieve its current playlist.
+Afterward, the status of MusicPD will be tracked."
+  (interactive)
+  (when emms-player-mpd-status-timer
+    (emms-cancel-timer emms-player-mpd-status-timer)
+    (setq emms-player-mpd-status-timer nil))
+  (emms-player-mpd-sync-from-mpd
+   nil #'emms-player-mpd-connect-1))
+
hunk ./emms-player-mpd.el 783
-      (emms-player-mpd-start-and-sync track)
+      (emms-player-mpd-start-and-sync)
hunk ./emms-player-mpd.el 789
-(defun emms-player-mpd-stop ()
-  "Stop the currently playing song."
+(defun emms-player-mpd-stop (&optional no-send)
+  "Stop the currently playing song.
+If NO-SEND is non-nil, do not send a stop command to MusicPD,
+just terminate the timer and mark the player as stopped."
hunk ./emms-player-mpd.el 796
-  (setq emms-player-stopped-p t)
-  (condition-case nil
-      (emms-player-mpd-send "stop")
-    (error nil))
-  (emms-player-stopped))
+  (let ((emms-player-stopped-p t))
+    (unless no-send
+      (condition-case nil
+          (emms-player-mpd-send "stop" nil #'ignore)
+        (error nil)))
+    (emms-player-stopped)))
hunk ./emms-player-mpd.el 806
-  (emms-player-mpd-send "pause"))
+  (emms-player-mpd-send "pause" nil #'ignore))
hunk ./emms-player-mpd.el 813
-                                sec)))
+                                sec)
+                        nil #'ignore))
hunk ./emms-player-mpd.el 819
-  (emms-player-mpd-send "next"))
+  (emms-player-mpd-send "next" nil #'ignore))
hunk ./emms-player-mpd.el 824
-  (emms-player-mpd-send "previous"))
+  (emms-player-mpd-send "previous" nil #'ignore))
hunk ./emms-player-mpd.el 828
+(defun emms-info-mpd-process (track info)
+  (dolist (data info)
+    (let ((name (car data))
+          (value (cdr data)))
+      (setq name (cond ((string= name "artist") 'info-artist)
+                       ((string= name "title") 'info-title)
+                       ((string= name "album") 'info-album)
+                       ((string= name "track") 'info-tracknumber)
+                       ((string= name "date") 'info-year)
+                       ((string= name "genre") 'info-genre)
+                       ((string= name "time")
+                        (setq value (string-to-number value))
+                        'info-playing-time)
+                       (t nil)))
+      (when name
+        (emms-track-set track name value)))))
+
+(defun emms-info-mpd-1 (track response)
+  (let ((info (emms-player-mpd-get-alist
+               (emms-player-mpd-parse-response response))))
+    (when info
+      (emms-info-mpd-process track info))))
+
hunk ./emms-player-mpd.el 856
-  (unless info
+  (if info
+      (emms-info-mpd-process track info)
hunk ./emms-player-mpd.el 865
-        (setq info (condition-case nil
-                       (emms-player-mpd-get-alist
-                        (emms-player-mpd-parse-response
-                         (emms-player-mpd-send
-                          (concat "find filename "
-                                  (emms-player-mpd-quote-file file)))))
-                     (error nil))))))
-  (when info
-    (dolist (data info)
-      (let ((name (car data))
-            (value (cdr data)))
-        (setq name (cond ((string= name "artist") 'info-artist)
-                         ((string= name "title") 'info-title)
-                         ((string= name "album") 'info-album)
-                         ((string= name "track") 'info-tracknumber)
-                         ((string= name "date") 'info-year)
-                         ((string= name "genre") 'info-genre)
-                         ((string= name "time")
-                          (setq value (string-to-number value))
-                          'info-playing-time)
-                         (t nil)))
-        (when name
-          (emms-track-set track name value))))))
+        (condition-case nil
+            (emms-player-mpd-send
+             (concat "find filename "
+                     (emms-player-mpd-quote-file file))
+             track
+             #'emms-info-mpd-1)
+          (error nil))))))
hunk ./emms-player-mpd.el 873
-;;;###autoload
-(defun emms-player-mpd-show (&optional insertp)
-  "Describe the current EMMS track in the minibuffer.
-If INSERTP is non-nil, insert the description into the current buffer instead.
-This function uses `emms-show-format' to format the current track.
-It differs from `emms-show' in that it asks MusicPD for the current track,
-rather than EMMS."
-  (interactive "P")
+(defun emms-player-mpd-show-1 (insertp response)
hunk ./emms-player-mpd.el 875
-                (emms-player-mpd-parse-response
-                 (emms-player-mpd-send "currentsong"))))
+                (emms-player-mpd-parse-response response)))
hunk ./emms-player-mpd.el 891
+;;;###autoload
+(defun emms-player-mpd-show (&optional insertp)
+  "Describe the current EMMS track in the minibuffer.
+If INSERTP is non-nil, insert the description into the current buffer instead.
+This function uses `emms-show-format' to format the current track.
+It differs from `emms-show' in that it asks MusicPD for the current track,
+rather than EMMS."
+  (interactive "P")
+  (emms-player-mpd-send "currentsong" insertp #'emms-player-mpd-show-1))
+
}

[emms-player-mpd: A few minor tweaks.
Michael Olson <address@hidden>**20060411013942] {
hunk ./emms-player-mpd.el 308
-(make-variable-buffer-local 'emms-player-mpd-playlist-id)
-
hunk ./emms-player-mpd.el 612
-                       (and emms-player-mpd-current-song
+                       (and (stringp emms-player-mpd-current-song)
hunk ./emms-player-mpd.el 705
-(defun emms-player-mpd-play (&optional id closure)
+(defun emms-player-mpd-play (&optional id)
hunk ./emms-player-mpd.el 717
-           (setq emms-player-mpd-current-song id)
+           (setq emms-player-mpd-current-song nil)
hunk ./emms-player-mpd.el 724
-     (lambda (start-timer response)
+     (lambda (closure response)
}

[emms-playlist-mode: Fix a bug where too many overlays were being added when 
the track was updated.
Michael Olson <address@hidden>**20060411025931] {
hunk ./emms-playlist-mode.el 175
-(defmacro with-inhibit-read-only-t (&rest body)
+(defmacro emms-with-inhibit-read-only-t (&rest body)
hunk ./emms-playlist-mode.el 179
-(put 'with-inhibit-read-only-t 'edebug-form-spec '(body))
+(put 'emms-with-inhibit-read-only-t 'edebug-form-spec '(body))
hunk ./emms-playlist-mode.el 184
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 190
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 197
-(defun find-overlay-emms-track ()
-  "Return the position of the next emms track."
-  (save-excursion
-    (while (and (not (eobp))
-               (not (get-char-property (point) 'emms-track)))
-      (goto-char (min (next-overlay-change (point))
-                     (next-single-property-change (point) 'emms-track))))
-    (point)))
-
hunk ./emms-playlist-mode.el 201
-(defun remove-all-overlays (&optional beg end)
+(defun emms-remove-all-overlays (&optional beg end)
hunk ./emms-playlist-mode.el 240
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 248
-          (remove-all-overlays (point-at-bol) (point-at-eol))
+          (emms-remove-all-overlays (point-at-bol) (point-at-eol))
hunk ./emms-playlist-mode.el 256
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 272
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 281
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 326
-      (remove-all-overlays (point-at-bol)
-                          (point-at-eol))
+      (emms-remove-all-overlays (point-at-bol)
+                               (point-at-eol))
hunk ./emms-playlist-mode.el 341
-  (remove-all-overlays (point-min)
-                      (point-max))
+  (emms-remove-all-overlays (point-min)
+                           (point-max))
hunk ./emms-playlist-mode.el 364
-      (with-inhibit-read-only-t
+      (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 383
-(defun emms-playlist-mode-insert-track (track)
-  "Insert the description of TRACK at point."
+(defun emms-playlist-mode-insert-track (track &optional no-newline)
+  "Insert the description of TRACK at point.
+When NO-NEWLINE is non-nil, do not insert a newline after the track."
hunk ./emms-playlist-mode.el 387
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 399
-   (insert "\n")))
+   (unless no-newline
+     (insert "\n"))))
hunk ./emms-playlist-mode.el 405
-  (with-inhibit-read-only-t
+  (emms-with-inhibit-read-only-t
hunk ./emms-playlist-mode.el 412
-                     ;; 1+ For the \n
-                     (1+ (cdr track-region)))
-       (emms-playlist-mode-insert-track track)))))
+                     (cdr track-region))
+       (emms-playlist-mode-insert-track track t)))))
}

[emms-player-mpd: Reset some extra state data on stop.
Michael Olson <address@hidden>**20060411030023] {
hunk ./emms-player-mpd.el 794
+  (setq emms-player-mpd-playlist-id nil)
+  (setq emms-player-mpd-current-song nil)
hunk ./emms-player-mpd.el 849
-      (emms-info-mpd-process track info))))
+      (emms-info-mpd-process track info)
+      (emms-track-updated track))))
}

[emms-player-mpd: Remove obsolete option.
Michael Olson <address@hidden>**20060411030539] {
hunk ./emms-player-mpd.el 158
-
-(defcustom emms-player-mpd-timeout 5
-  "The maximum acceptable delay (in seconds) while waiting for a
-response from the MusicPD server."
-  :type 'integer
-  :group 'emms-player-mpd)
}

[emms-player-mpd: Make sure inserted text from emms-player-mpd-show goes to the 
right buffer.
Michael Olson <address@hidden>**20060411033552] {
hunk ./emms-player-mpd.el 868
-(defun emms-player-mpd-show-1 (insertp response)
+(defun emms-player-mpd-show-1 (closure response)
hunk ./emms-player-mpd.el 872
+         (insertp (car closure))
+         (buffer (cdr closure))
hunk ./emms-player-mpd.el 885
-        (insert string)
+        (with-current-buffer buffer
+          (insert string))
hunk ./emms-player-mpd.el 897
-  (emms-player-mpd-send "currentsong" insertp #'emms-player-mpd-show-1))
+  (emms-player-mpd-send "currentsong" (cons insertp (current-buffer))
+                        #'emms-player-mpd-show-1))
}

Context:

[patch resolution
Trent Buck <address@hidden>**20060409205547] 
[emms-player-mplayer.el: mplayer supports FLAC, too.
address@hidden 
[emms-info-libtag.el: remove unused variables.
Trent Buck <address@hidden>**20051204181347] 
[emms-info-libtag.el: libtag can also handle Speex files.
Trent Buck <address@hidden>**20051120065009] 
[emms-playlist-mode: Remove obsolete function.
Michael Olson <address@hidden>**20060409052556] 
[Add new playlist sources to documentation.
Michael Olson <address@hidden>**20060409005306] 
[emms-playlist-mode: Use emms-playlist-save instead of a custom function.
Michael Olson <address@hidden>**20060409005234] 
[emms-source-playlist: Get things working to my satisfaction, like saving 
playlists in different formats and (optionally) being prompted for which format.
Michael Olson <address@hidden>**20060409003540] 
[emms-playlist-mode: Make it possible to use edebug on `with-inhibit-read-only' 
forms.
Michael Olson <address@hidden>**20060406042615] 
[emms-player-mpd: If the MusicPD daemon goes away, make sure that we can still 
stop EMMS.
Michael Olson <address@hidden>**20060406034553] 
[Updated manual for emms-lyrics.
address@hidden 
[New variable: `emms-lyrics-coding-system'. It's the coding system used
address@hidden
 in the output of lyrics. (I sent this before, maybe some unexpected
 problem happened.)
] 
[emms-player-mpd: Never set emms-player-stopped-p, since this is only to be 
done when the user explicitly stops the music.
Michael Olson <address@hidden>**20060402184833] 
[Make sure that negated character classes in regexps include the newline 
character, so that there is no possibility of empty lines being matched.
Michael Olson <address@hidden>**20060402175002] 
[emms-playlist-sort.el, quote FORM argument to eval-after-load
address@hidden 
[Update manual and emms-setup with the preferred way of invoking 
emms-playing-time and emms-lyrics from .emacs.  Update MusicPD section of 
manual.
Michael Olson <address@hidden>**20060402144407] 
[emms-streams: Make some options customizable.  Fix compiler warnings.
Michael Olson <address@hidden>**20060402031546] 
[emms-source-playlist: Add support for m3u and pls playlists.
Michael Olson <address@hidden>**20060402024556] 
[README: Added a paragraph about libtag.
address@hidden 
[emms-info-libtag.el: Add a warning about the possible conflict with 
emms-info-mp3info
address@hidden 
[Some minor modifications
address@hidden 
[Use insert-file instead of insert-file-literally to get around coding system 
problems
address@hidden 
[Added emms-play-playlist
address@hidden 
[Remove emms-tageditor.el, since it only works with emms-pbi.el.  It might be 
useful to re-add this, once it has been rewritten.  But first, let's get a 
release out the door :^) .
Michael Olson <address@hidden>**20060401233146] 
[emms-player-mpd: Don't use define-emms-simple-player, since we provide our own 
versions of the functions that it produces.
Michael Olson <address@hidden>**20060401233036] 
[emms-lyrics: Make this behave like other add-ons.
Michael Olson <address@hidden>**20060401232918] 
[Fix a variety of compilation errors and warnings.
Michael Olson <address@hidden>**20060401232610] 
[Makefile: Don't show Emacs commandline.  Remove generated HTML file in clean 
rule.
Michael Olson <address@hidden>**20060401232522] 
[emms-streams: Add prefix to utility functions.
Michael Olson <address@hidden>**20060401210849] 
[Make all add-on files toggle-able.
Michael Olson <address@hidden>**20060401210634] 
[Added emms-source-playlist.el, moved stuff from emms.el there
address@hidden 
[Move emms-parse-playlist to emms-source-file.el, rename to 
emms-source-file-parse-playlist
address@hidden 
[Remove emms-pl-manip.el
Michael Olson <address@hidden>**20060401194358] 
[Remove emms-pbi*.el at forcer's request.
Michael Olson <address@hidden>**20060401193306] 
[emms-mode-line: Add toggle functions and autoload cookies.
Michael Olson <address@hidden>**20060401191825] 
[emms-player-mpd: Use simpler value for connect function.
Michael Olson <address@hidden>**20060401190427] 
[Makefile: Use correct extension in new HTML rule.
Michael Olson <address@hidden>**20060401184547] 
[Makefile: Update .PHONY, add .PRECIOUS line for generated files, add rule for 
creating HTML version of documentation.
Michael Olson <address@hidden>**20060401180331] 
[emms-streams.el (emms-stream-default-list): Add "Voices from Within"
address@hidden 
[All stable extentions documented
address@hidden 
[emms-player-mpd.el (emms-info-mpd): Prevent an error when we can't connect to 
a MusicPD instance.  This prevents EMMS from causing Emacs to stop reading 
initialization settings.
Michael Olson <address@hidden>**20060326230003] 
[Added MusicPD to the Emms manual.
address@hidden 
[Added `emms-playlist-sort' to the Emms manual.
address@hidden 
[re-organization of emms-setup levels
address@hidden 
[emms-player-mpd: Make importing of MusicPD playlist a bit less error-prone.
Michael Olson <address@hidden>**20060323135109] 
[emms-player-mpd: Make pausing work after importing a playlist from MusicPD.
Michael Olson <address@hidden>**20060320071337] 
[emms-player-mpd: Try to get values for name and port from environment.  Fix 
awkwardness in `emms-player-mpd-block'.
Michael Olson <address@hidden>**20060320065153] 
[emms-player-mpd: Implement importing the current MusicPD playlist into EMMS 
and fix a couple of bugs.
Michael Olson <address@hidden>**20060320061455] 
[finished updating copyrights
address@hidden 
[fixed copyright years and copyright holder
address@hidden 
[emms-source-file: Yes, playlist does work. (Removed comment)
address@hidden 
[emms-player-simple.el (alsaplayer): Fixed regexp.
address@hidden 
[emms-player-simple.el: Added alsaplayer support. Thanks to indio on #emacs.
address@hidden 
[emms-player-mpd: Do a seek when the song has changed in case several seconds 
have elapsed between detection and song change.
Michael Olson <address@hidden>**20060302032315] 
[playlist mode yank bug fix
address@hidden 
[update README file
address@hidden 
[Pass correct parameter to `run-at-time', to make sure only one timer is
address@hidden
 running.
] 
[add two macros, one to emms.el and the other to emms-playlist-mode.el. The 
former fixes a bug in which the software attempts to access a completely 
narrowed buffer and the latter because it looks nicer.
address@hidden 
[emms-player-mpd: Detect when the server has stopped, and call 
emms-player-stopped.
Michael Olson <address@hidden>**20060107081052] 
[emms-player-mpd: Implement blocking so that code in timers doesn't conflict.
Michael Olson <address@hidden>**20060107064358] 
[Rename m3u-playlist source to "playlist" and support .pls files.  The 
playlist-parsing routine has been moved to a separate function, since the 
MusicPD player also needs to use it.  Detect URLs in playlists and use type of 
'url when creating tracks for them.
Michael Olson <address@hidden>**20060107053310] 
[Use emms-replace-regexp-in-string.
Michael Olson <address@hidden>**20060106032400] 
[emms-player-mpd: Escape specials in filenames like the other MPD clients do.
Michael Olson <address@hidden>**20060106032121] 
[emms-stream-info: Use emms-replace-regexp-in-string.
Michael Olson <address@hidden>**20060106032048] 
[New XEmacs compatibility function: emms-replace-regexp-in-string
Michael Olson <address@hidden>**20060105172144] 
[emms-player-mpd: Quote file argument so that filenames with spaces are treated 
correctly.
Michael Olson <address@hidden>**20060105014642] 
[Move `emms-cancel-timer' to a compatibility section in emms.el
address@hidden 
[emms-playing-time: Make sure that we don't start more than one timer instance.
Michael Olson <address@hidden>**20060104224902] 
[emms-player-mpd: Make it the default to sync the MusicPD playlist with the 
EMMS playlist, since this is what most EMMS users will probably want.
Michael Olson <address@hidden>**20060104224734] 
[Make emms-player-mpd work with emms-playing-time.
Michael Olson <address@hidden>**20060104081359] 
[emms-player-mpd: Bring this up-to-par with the other backends, in that it can 
update the current playlist position and load the contents of the current 
playlist into MusicPD.
Michael Olson <address@hidden>**20060104075237] 
[Use timers in a way that is compatible with both Emacs and XEmacs.
Michael Olson <address@hidden>**20060104061024] 
[emms-player-mpd: Docfix, wait 200 millisecs for process to start, add more 
output when verbose mode is enabled.
Michael Olson <address@hidden>**20060103040456] 
[emms-player-mpd: Fix documentation.  The mpc binary is no longer needed.
Michael Olson <address@hidden>**20060102090752] 
[emms-player-mpd: Make sure the process gets closed autommatically when exiting 
Emacs.
Michael Olson <address@hidden>**20060101020942] 
[Significantly improve (and speed up) MusicPD support.
Michael Olson <address@hidden>**20051231083223] 
[`emms-score-set-playing' is not really "set", but "add". Fix this. Same
address@hidden
 for `emms-score-set-file-on-line'.
] 
[Added `emms-playlist-sort-by-score'.
address@hidden 
[Fixed emms-score.el to accommordate with changes in EMMS2. I've also
address@hidden
 reorganized the code structure a little bit and added bunches of new
 user interface functions.
] 
[Move `emms-lyrics-mode' to the end, or it won't work on CVS Emacs.
address@hidden 
[fix mode-alter bug
address@hidden 
[update manual for playlist-mode
address@hidden 
[make emms-playlist-mode emacs21.4 compatible
address@hidden 
[fix emms-playlist-save-as-m3u
address@hidden 
[killing and yanking in the interactive playlist buffer
address@hidden 
[Killing and yanking
address@hidden 
[fix manual sectioning
address@hidden 
[Fix conflicts in emms-playlist-mode.el
address@hidden 
[Fix emms.texinfo for PDF output (thanks twb)
address@hidden 
[Added `emms-playlist-mode-go-popup' for popuping emms-playlist as a side
address@hidden
 window.
] 
[emms-info-mp3info.el (emms-info-mp3find-arguments): use info-tracknumber 
instead of info-tracknum, so as to be consistent with ogginfo.
Trent Buck <address@hidden>**20051119150805
 emms-info.el: Update documentation.
] 
[emms-source-file.el: add missing third clause to AUTOLOAD calls.
Trent Buck <address@hidden>**20051028142538] 
[emms-info-libtag.el: Fix a couple of typos.
Trent Buck <address@hidden>**20051119183945] 
[Implement an emms-info function using the libtag package.
Trent Buck <address@hidden>**20051119181528] 
[Finished rewriting manual
address@hidden 
[More manual work, but still only 71 percent done
address@hidden 
[Added support for toggling default action in streams
address@hidden 
[Added a hook for emms-streams
address@hidden 
[debian/emms.emacs-install: Leave symlinks in bytecode dir for 
find-library/function/variable.
Trent Buck <address@hidden>**20051027172739] 
[debian/rules: swap binary-indep and binary-arch bodies, since emms is packages 
as source code.
Trent Buck <address@hidden>**20051027150418] 
[Makefile (ChangeLog): Generate ChangeLog from darcs metadata.
Trent Buck <address@hidden>**20051027133919
 debian/rules (build-stamp): Have make generate the ChangeLog.
 (build-arch): Include ChangeLog and debian/changelog in debian package.
] 
[Added simple player "playsound".
Trent Buck <address@hidden>**20051023012053] 
[Remove TODO from debian/docs.
Trent Buck <address@hidden>**20050912133353] 
[Don't attempt to dh_installchangelogs ChangeLog in debian/rules.
Trent Buck <address@hidden>**20050912125754] 
[Add prefix keys support.
address@hidden 
[manual 71% done
address@hidden 
[fix emms-info-ogginfo laguange
address@hidden 
[manual update (68% done)
address@hidden 
[emms-metaplaylist fix requested by Lukhas
address@hidden 
[A minor spell correction.
address@hidden 
[Make emms-mode-line-icon use the good function to get the current track
address@hidden 
[Rename `emms-playlist-save-active-as-m3u' to 
`emms-playlist-save-current-as-m3u'.
address@hidden 
[emms-playlist-sort.el: New file containing various playlist sort
address@hidden
 functions.
] 
[emms-setup.el: Added `emms-playlist-sort' to `emms-devel'.
address@hidden 
[emms-setup.el: Moved `emms-lyrics' and `emms-playing-time' into
address@hidden
 `emms-all'.
] 
[emms-lyrics.el: New function: `emms-lyrics-restore-mode-line'.
address@hidden 
[emms-playing-time.el: New function: `emms-playing-time-restore-mode-line'.
address@hidden 
[manual work (57% done)
address@hidden 
[emms.el: Should initialize `emms-player-paused-p' to nil at start. Or a
address@hidden
 pause + stop would make `emms-player-paused-p' be wrong.
] 
[emms-mode-line.el: Made `emms-mode-line-alter' be compatible with
address@hidden
 `emms-track-updated-functions'.
] 
[emms-mode-line.el: When artist or title info cann't be achieved, show
address@hidden
 file name without directory.
] 
[emms-mode-line: Changed dead `emms-playlist-current-track-changed-hook'
address@hidden
 to `emms-track-updated-functions'.
] 
[emms-playlist-mode-switch-buffer
address@hidden 
[Yet Another Installment of the manual re-write
address@hidden 
[emms-setup.el re-write
address@hidden 
[more manual re-writing
address@hidden 
[manual work
address@hidden 
[Another installment of manual changes
address@hidden 
[some manual fixes (just the start)
address@hidden 
[Rename emms-default.el to emms-setup.el.
address@hidden 
[List all the changes needed in the manual
address@hidden 
[Update tracks with a specific function, and provide 
emms-track-updated-functions
address@hidden 
[emms.el (emms-playlist-new): Use interactive-p rather than
Michael Olson <address@hidden>**20050925165342
 called-interactively-p, since the latter is not available in Emacs21.
] 
[emms-streams.el: Update `emms-info-file-info-song-artist' so that it
Michael Olson <address@hidden>**20050925160336
 can deal with the new interface.
] 
[emms-playlist-mode.el: 3rd attempt to not clobber
Michael Olson <address@hidden>**20050924183844
 emms-playlist-buffer-p.
] 
[rollback patch to fix adding tracks.
address@hidden 
[Adding emms-info-ogginfo.el and consiquently modifying emms-default
address@hidden 
[add emms-metaplaylist-mode.el
address@hidden 
[emms-playing-time.el: 
address@hidden
 
 1 New functions: `emms-playing-time-enable',
 `emms-playing-time-disable', `emms-playing-time-toggle', for handling
 hook stuffs. 
 
 2 Removed `emms-playing-time-display-p' where unnecessary now. 
 
 3 Updated commentary and author name. :-)
] 
[eemms-lyrics.el:
address@hidden
 
 1 New functions: `emms-lyrics-enable', `emms-lyrics-disable',
 `emms-lyrics-toggle', for handling hook stuffs.
 
 2 Removed `emms-lyrics-display-p' where unnecessary now. 
 
 3 Updated commentary and author name. :-)
] 
[emms-lyrics.el: Fixed a bug in `emms-lyrics-start'.
address@hidden 
[emms-playing-time.el: Applied standard customization definitions.
address@hidden 
[emms-info-mp3info: Provide a way to configure the mp3info output coding system.
address@hidden 
[Add documentation of the define symbols for emms-info.el.
address@hidden 
[remove emms-metaplaylist-mode code from emms-playlist-mode
address@hidden 
[emms-playing-time: Since 'info-playing-time is an int now, changed
address@hidden
 `emms-playing-time-display' accordingly.
] 
[emms-info-mp3info: Use number for 'info-playing-time.
address@hidden 
[emms-playing-time.el: Updated the playing-time retrieval method, so as
address@hidden
 to be able to display playing-time again.
] 
[emms-playlist-mode: Make sure emms-playlist-buffer-p is set, since we
Michael Olson <address@hidden>**20050922132808
 destroy all local variables.
] 
[emms-playlist-mode-go: Add buffer-live-p check to circumvent a
Michael Olson <address@hidden>**20050922132424
 "selecting deleted buffer" error.
] 
[emms-player-mplayer.el: Set resume method to nil to just use pause.
address@hidden 
[fix emms-score.el and emms-info-ogg.el borkage
address@hidden 
[clean-up emms-info-ogg.el
address@hidden 
[fix ogg-info
address@hidden 
[emms-info-mp3info ignores files which are not mp3s
address@hidden 
[Don't set values mp3info has nothing for
address@hidden 
[later-do.el: Run timer after function did run to avoid stacking
address@hidden 
[Inefficiency removed: Update each track only once :P
address@hidden 
[Ignore read-onliness when updating a track in a playlist buffer
address@hidden 
[Use time-less-p instead of <= for times
address@hidden 
[later-do.el emms version
address@hidden 
[emms-streams shouldn't overwrite `emms-track-initialize-functions'
address@hidden 
[Typo fix (findo -> find)
address@hidden 
[emms-info-track-description: Fall back to old behavior if no title and artist
address@hidden 
[Hotfix for emms-streams due to info changed. Please fix later.
address@hidden 
[Fix emms-default.el, and ignore ogg stuff for now.
address@hidden 
[Remove emms-info-later-do.el
address@hidden 
[Fix emms-default.el for new emms-info.el
address@hidden 
[emms-info-mp3info.el updated for newest emms-info.el
address@hidden 
[emms-info.el rewrite.
address@hidden 
[later-do: Work even if the called function errors out.
address@hidden 
[emms-random: Use `emms-playlist-current-select-random'.
address@hidden 
[fixing track killing some more
address@hidden 
[use insert function for yanking
address@hidden 
[Fixed saving/loading for emms-playlist-mode, also added track updating
address@hidden 
[Added track updating to emms.
address@hidden 
[Added emms-playlist-mode-insert-function (fixed sorting and shuffling 
font-lock)
address@hidden 
[Fix bugs in lyrics and mode-line modes when switching songs, fix yanking in 
playlist buffer
address@hidden 
[Fix track switching error and interactive playlist yanking
address@hidden 
[Fix track switching error and interactive playlist yanking
address@hidden 
[Added 'emms-playlist-clear to the default key-map for emms-playlist-mode
address@hidden 
[Make emms-playlist-current-clear an interactive function.
address@hidden 
[Added 'emms-playlist-clear to default playlist keymap
address@hidden 
[include streaming into emms-default and fix streaming info from within the 
*EMMS Streams* buffer
address@hidden 
[Make `emms-playlist-clear' interactive so that I can map it to a key.
address@hidden 
[Make `with-current-emms-playlist' disable read-onlyness.
address@hidden 
[fix emms-streams.el and emms-player-mplayer.el
address@hidden 
[comment out emms-info-playlist breakage
address@hidden 
[emms-playlist-set-playlist-buffer: Ensure the selected buffer is a playlist.
address@hidden 
[Ignore read-onliness when opening a playlist-mode-buffer.
address@hidden 
[fixing errors after breakage
address@hidden 
[Big renaming for current buffer/current playlist distinction.
address@hidden
 All playlist functions which work on the current playlist now are named
 `emms-playlist-current-...'. Other functions named `emms-playlist-...'
 work on the current buffer.
 This affects the following functions:
 
 emms-playlist-clear => emms-playlist-current-clear
 emms-playlist-selected-track => emms-playlist-current-selected-track
 emms-playlist-select-next => emms-playlist-current-select-next
 emms-playlist-select-previous => emms-playlist-current-select-previous
 emms-playlist-select-random => emms-playlist-current-select-random
 emms-playlist-select-first => emms-playlist-current-select-first
 emms-playlist-select-last => emms-playlist-current-select-last
 emms-playlist-insert-source => emms-playlist-current-insert-source
] 
[emms-playlist-new: No, it's a major mode, DONT pass an argument!
address@hidden 
[Making emms-default now emms-playlist-mode compatible
address@hidden 
[emms-playlist-new: Pass positive argument to mode function.
address@hidden 
[Renaming the "playlist" source to "streamlist".
address@hidden
 
 Things might be broken.
] 
[clean-up pseudo font-locking
address@hidden 
["font-locking" for inserted, unselected tracks
address@hidden 
[emms.el missing quote fix, emms-playlist-mode.el kill-track fix
address@hidden 
[Adding a bunch of FIXME tags for the playlist source
address@hidden
 
 When we come to a consensus on the naming, we'll just fix it.
 Yrk should have a word about it, stream-playlist sounds good.
] 
[Fixing emms-playlist-mode-open-buffer
address@hidden 
[emms-playlist-select should not switch to the playlist buffer.
address@hidden 
[Renaming emms-playlist-save to emms-playlist-mode-save-buffer
address@hidden 
[Added docstrings and clean-up for emms-playlist-mode.el
address@hidden 
[A kinder, gentler emms-playlist-mode-go
address@hidden 
[clean-up and emms-playlist-mode-center-current
address@hidden 
[emms-player-mplayer.el: mplayer also knows rm, rmvb, mp4, ...etc.
address@hidden 
[multiple fixes to emms-playlist-mode.el
address@hidden 
[emms-show now knows when nothing is playing.
address@hidden 
[Inhibit read-only in `emms-playlist-insert-track'
address@hidden 
[mpd-updates
Michael Olson <address@hidden>**20050917021138
 emms-player-mpd.el: Add handler for 'resume.
 (emms-player-mpd-paused-p): Remove, since we already have
 emms-player-paused-p.
 (emms-player-mpd-pause): Use toggle instead of either play or
 pause.
] 
[Making emms-playlist-mode-go respect emms-playlist-buffer
address@hidden 
[Add `emms-ensure-player-playing-p'
address@hidden 
[Adding emms-playlist-mode-save and -open
address@hidden 
[Small fixes
address@hidden 
[Be able to clear the playlist buffer even if it's killed.
address@hidden 
[Adding emms-playlist-save-active-as-m3u
address@hidden 
[Fixing a typo in emms-playlist-save-active
address@hidden 
[Docstrings for playlist saving functions
address@hidden 
[Adding m3u playlist format for saving.
address@hidden 
[Added emms-playlist-mode.el
address@hidden 
[Shuffle, sort and source-add don't move point anymore.
address@hidden 
[Provide source insertion
address@hidden 
[Cleaned up `emms-playlist-save' a bit
address@hidden 
[Adding emms-playlist-save and -active-save
address@hidden
 
 Opening will come soon.
 
] 
[Fix emms-playlist-new and make emms-playlist-clear use it.
address@hidden 
[Removing the old emms-save-playlist
address@hidden 
[emms-source-add now checks for an as of yet unset marker, too.
address@hidden 
[Add `emms-playlist-buffer-p'.
address@hidden 
[emms-lyrics.el: Changed to `emms-player-seeked-hook' to
address@hidden
 `emms-player-seeked-functions', defined in `emms.el'.
] 
[emms-playing-time.el: Changed to `emms-player-seeked-hook' to
address@hidden
 `emms-player-seeked-functions', defined in `emms.el'.
] 
[emms.el: Fix seek bug in `emms-player-seek'.
address@hidden 
[emms-lyrics.el: Updated commentary and applied standard customization
address@hidden
 definitions.
] 
[ogg-comment.el: Define macros before using them.
address@hidden 
[Add more mikmod command line args.
address@hidden 
[Added mikmod support (thanks to Martin Schoenmakers)
address@hidden 
[emms-playlist-new, emms-playlist-set-playlist-buffer: New commands.
address@hidden 
[Add `emms-player-simple-regexp'. Also, use it as appropriate.
address@hidden 
[Fixing typo in file regexps for gstreamer
address@hidden 
[Updated define-emms-simple-player examples in emms.texinfo
address@hidden 
[Call widen in shuffle and sort.
address@hidden 
[Added `emms-playlist-delete-track-function'.
address@hidden 
[Remove emms-playlist-kill-track.
address@hidden 
[Fix shuffling in combined sources.
address@hidden 
[Call `emms-shuffle' to shuffle a source.
address@hidden 
[Cleanup of the shuffle/sort stuff
address@hidden 
[emms-shuffle-all: Depend on the value of current, not of emms-player-playing-p
address@hidden 
[Don't make emms-playlist-sort and emms-playlist-shuffle interactive.
address@hidden 
[Keep the selected song correct for shuffling and sorting
address@hidden 
[Throw errors for `emms-next' and `emms-previous' at the end/beginning of the 
playlist
address@hidden 
[Added `emms-randomÃ' (idea by twb)
address@hidden 
[Add shuffling and sorting.
address@hidden 
[Lots of condition-case fixes.
address@hidden 
[First attempt at reading playing time for .ogg
address@hidden
 
 Problem : it's a bit long to read the info now.
 We need to optimize that.
 
] 
[Move gstreamer support into simple player.
address@hidden 
[Add pause and resume to the simple player.
address@hidden 
[emms-stream-info.el: Use emms-playlist-selected-track.
address@hidden 
[Removed old gstreamer wrappers
address@hidden 
[Added new generic wrapper for gstreamer
address@hidden 
[Fixed typo in emms.el
address@hidden
 
 Non quoted hook variable
 
] 
[Rewrote emms-player-gstreamer
address@hidden 
[Typo: It's emms-playlist-insert-track, not ...-track-insert.
address@hidden 
[emms-player-mpd doesn't need emms-player-extensions anymore.
address@hidden 
[FAQ: Typo fix (Thes -> The)
address@hidden 
[Fixing the extensions problem.
address@hidden
 
 Just removed the requires, and added require mplayer
 in emms-default.
 
] 
[Select a track after adding, too, if none is selected.
address@hidden 
[Rename emms-mpd.el to emms-player-mpd.el
address@hidden 
[Rename emms-lyric.el to emms-lyrics.el
address@hidden 
[Add speex support
address@hidden 
[Add pause and seek support to emms.el.
address@hidden
 This factors out the mplayer support into emms-player-mplayer.el,
 and removes emms-player-extensions.el.
] 
[renaming the provide, Emacs complains otherwise
address@hidden 
[Fixed emms-mode-line-icon and -playing-time
address@hidden 
[Rename emms-gstreamer.el to emms-player-gstreamer.el
address@hidden 
[fixing emms-lyric.el and emms-mode-line.el
address@hidden
 
 I don't have any lyric file, so I can't test it. But 
 there are no errors :)
 
 
] 
[emms.el (with-current-emms-playlist): Also recreate when the buffer is
address@hidden
 dead.
] 
[emms.el (emms-next-noerror): Always return non-nil when
address@hidden
 `emms-playlist-select-next' doesn't error out.
] 
[Playlist buffer rewrite
address@hidden 
[Initial commit (CVS 2005-09-11)
address@hidden 
Patch bundle hash:
902e7cf973d8758e6bfee38a551cd76504bbe5ae

reply via email to

[Prev in Thread] Current Thread [Next in Thread]