From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: How to use http-get properly in code Date: Tue, 07 Feb 2006 00:23:48 +0100 Organization: sometimes Message-ID: <7e3biwkr5n.fsf@ada2.unipv.it> References: <7e7j88ks9m.fsf@ada2.unipv.it> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139268715 18843 80.91.229.2 (6 Feb 2006 23:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2006 23:31:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 00:31:52 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F6Fpm-0005xo-47 for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Feb 2006 00:31:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6Ft6-0000kP-JF for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Feb 2006 18:35:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!LF.net!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: ada2.unipv.it Original-X-Trace: quimby.gnus.org 1139268228 24464 193.204.44.145 (6 Feb 2006 23:23:48 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Mon, 6 Feb 2006 23:23:48 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:ifN4j3TCWkzwNEg4LBz8LtPcBaE= Original-Xref: shelby.stanford.edu gnu.emacs.help:137422 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33046 Archived-At: Thien-Thi Nguyen writes: > Mathias Dahl 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