emms-help
[Top][All Lists]
Advanced

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

[Emms-help] diff to emms-playlist.el rev:1.2


From: Mario Domgörgen
Subject: [Emms-help] diff to emms-playlist.el rev:1.2
Date: Sun, 30 Nov 2003 16:44:38 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Simplified the whole thing...

*** emms-playlist.el.~1.2.~     Sat Nov 29 15:00:55 2003
--- emms-playlist.el    Sun Nov 30 16:44:06 2003
***************
*** 338,359 ****
  (defun emms-pbi-import-playlist (filename)
    "Import a previously exported playlist from FILENAME."
    (interactive "fFile to load playlist from: ")
!   (save-excursion
!     (with-temp-buffer
!       (find-file filename)
!       (goto-char (point-min))
!       (emms-stop)
!       (let ((new-pls (make-vector 0 nil)))
!       (while (not (eobp))
!         (setq new-pls
!               (vconcat new-pls
!                        (list (buffer-substring (point-at-bol)
!                                                (point-at-eol)))))
!         (forward-line 1))
!       ;; set this playlist
!       (emms-playlist-set new-pls))
!       (emms-play)
!       (kill-buffer (current-buffer)))))
  
  ;; Major-mode for the playlist-buffer
  (define-derived-mode  emms-pbi-mode fundamental-mode "EMMS playlist"
--- 338,352 ----
  (defun emms-pbi-import-playlist (filename)
    "Import a previously exported playlist from FILENAME."
    (interactive "fFile to load playlist from: ")
!   (with-temp-buffer
!     (insert-file-contents-literally filename)
!     (emms-stop)
!     ;; set this playlist
!     (emms-playlist-set
!      (vconcat (split-string (buffer-substring (point-min)
!                                             (point-max)))))   
!     (emms-play)))
! 
  
  ;; Major-mode for the playlist-buffer
  (define-derived-mode  emms-pbi-mode fundamental-mode "EMMS playlist"


-- 
A file that big?
It might be very useful.
But now it is gone.





reply via email to

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