EMMS Developers,
I noticed that after I updated EMMS from the package lists, I had
to go in and remove the `(emms-score 1)' command from
emms-setup.el, since I run `(emms-devel)' from my .emacs file. It
kept throwing an `End of file during parsing' error, so I looked
into emms-score.el to see what the problem was. I found that in
`emms-score-load-hash' it was attempting to read from the score
file, but the score file was empty. Then, without checking such a
possibility, it continued attempting to process it. I've attached
a patch that should fix this. It simply reads the score file into
a string, then only proceeds if the string is not empty. I ran it
myself, and appears to be working correctly.
Ian D
diff --git a/lisp/emms-score.el b/lisp/emms-score.el
index 78e17db..0f5b5da 100644
--- a/lisp/emms-score.el
+++ b/lisp/emms-score.el
@@ -246,14 +246,15 @@ See also `emms-next-noerror'."
"Load score hash from `emms-score-file'."
(interactive)
(if (file-exists-p emms-score-file)
- (mapc (lambda (elt)
- (puthash (car elt) (cdr elt) emms-score-hash))
- (read
- (with-temp-buffer
+ (let ((score-string (with-temp-buffer
(emms-insert-file-contents emms-score-file)
(buffer-string))))
+ (if (> (length score-string) 0)
+ (mapc (lambda (elt)
+ (puthash (car elt) (cdr elt) emms-score-hash))
+ (read score-string)))
;; when file not exists, make empty but valid score file
- (emms-score-save-hash)))
+ (emms-score-save-hash))))
(defun emms-score-get-plist (filename)
(gethash filename emms-score-hash))
_______________________________________________
Emms-patches mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-patches