help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to use http-get properly in code


From: Thien-Thi Nguyen
Subject: Re: How to use http-get properly in code
Date: Tue, 07 Feb 2006 00:23:48 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Thien-Thi Nguyen <ttn@glug.org> writes:

> Mathias Dahl <brakjoller@gmail.com> writes:
>
>> ;; The sentinel
>> (defun ef-http-get-sentinel (proc message)
>>   (save-excursion
>>     (set-buffer (process-buffer proc))
>>     (setq ef-response-xml
>>           (xml-parse-region (point-min) (point-max)))))
>
> you are confusing a sentinel and a process output filter.
> the former is called on changes to process state (e.g., hangup).
> this function (above) is an example of the latter.

oops, i was mistaken.  if you are indeed confusing these concepts, that
is not apparent (or at least it is not as apparant as my own confusion
about how to recognize the confusion of others, if there be any).  sorry
about that!  (all the other gnugo plugs are still valid, however. ;-)

a better answer to your overall question would be to suggest checking
MESSAGE to fine-tune the actions of `ef-http-get-sentinel'.  you may
find that `ef-http-get-sentinel' is being called many times.  for those
times when the process is not yet finished (implying that its output is
not yet well-formed), just do nothing.

thi


reply via email to

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