[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] Re: Last.fm plugin for EMMS
From: |
Tassilo Horn |
Subject: |
[emms-help] Re: Last.fm plugin for EMMS |
Date: |
Tue, 10 Oct 2006 11:24:16 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Tim Schumacher <address@hidden> writes:
Hi Tim,
> I have tried your last.fm script and it seems to be working, or at
> least the songs get submitted ;-). What kind of bug is this in
> http-*.el?
In yesterday's CVS checkout of http-emacs the sentinel functions were
not called. A simple reordering of two lines in both http-{post,get}.el
fixed the problem for me.
I wonder why it is working for you, but not for me. At least my change
is unlikely to break something, I think.
--8<---------------cut here---------------start------------->8---
Gemeinsame Unterverzeichnisse: http-emacs/CVS und http-emacs.old/CVS.
diff --ignore-all-space -u http-emacs/http-get.el http-emacs.old/http-get.el
--- http-emacs/http-get.el 2006-10-09 12:43:34.000000000 +0200
+++ http-emacs.old/http-get.el 2004-10-05 02:13:31.000000000 +0200
@@ -406,10 +406,10 @@
(setq command (format "%s%s\r\n\r\n" start-line message-headers))
(http-log (format "Connecting to %s %d\nCommand:\n%s\n" host port command))
(http-log message-headers)
+ (set-process-sentinel proc (or sentinel 'ignore))
(set-process-coding-system proc 'binary 'binary) ; we need \r\n
;; we need this to be able to correctly decode the buffer with
;; decode-coding-region later
- (set-process-sentinel proc (or sentinel 'ignore))
(when (fboundp 'set-buffer-multibyte)
(with-current-buffer buf (set-buffer-multibyte nil)))
(set-process-filter proc 'http-filter)
Nur in http-emacs: http-get.el.~1.30.~.
diff --ignore-all-space -u http-emacs/http-post.el http-emacs.old/http-post.el
--- http-emacs/http-post.el 2006-10-09 12:44:05.000000000 +0200
+++ http-emacs.old/http-post.el 2004-11-21 21:54:16.000000000 +0100
@@ -116,8 +116,8 @@
(concat "HTTP POST " url)
buf (if http-proxy-host http-proxy-host host)
(if http-proxy-port http-proxy-port port)))
- (set-process-coding-system proc 'binary 'binary) ; we need \r\n
(set-process-sentinel proc (or sentinel 'ignore))
+ (set-process-coding-system proc 'binary 'binary) ; we need \r\n
(set-process-filter proc 'http-filter)
(set-marker (process-mark proc) (point-min) buf)
(if sentinel
Nur in http-emacs: http-post.el.~1.14.~.
--8<---------------cut here---------------end--------------->8---
> So far thanks for the work.
I'm glad you like it.
Bye,
Tassilo
--
A morning without coffee is like something without something else.