From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: http-get and GDS (Google Desktop Search) Date: Wed, 08 Feb 2006 14:52:53 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139425787 3889 80.91.229.2 (8 Feb 2006 19:09:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2006 19:09:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 08 20:09:44 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 1F6ueb-0002hJ-Kl for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Feb 2006 20:07:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6ucS-0005HS-Dm for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Feb 2006 14:04:48 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-X-Trace: individual.net v7LP2nBBH+cAc7OMY1g45QFquLqvrllBp4Fww8Dz5pONQ2HJz/ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:YmpqhxMCt/JC6P/3I281hGPKCgc= Original-Xref: shelby.stanford.edu gnu.emacs.help:137448 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:33072 Archived-At: Klaus Straubinger writes: > It works for me. I use it in Gnus to retrieve some RSS groups > and of course together with Emacs/W3. It works for me too: ;; Emacs GDS-prototype (require 'xml) (defvar gds-base-url nil "") (setq gds-base-url "http://127.0.0.1:4664/search&s=SECURITY-TOKEN") (defun gds-get-xml-response (search) "Do a Google Desktop Search for SEARCH, return result as xml" (let (data xml gds-buffer (url-buffer (url-retrieve-synchronously (format "%s?q=%s&format=xml" gds-base-url search)))) (save-excursion (set-buffer url-buffer) (setq data (buffer-substring (point-min) (point-max))) ;; Create our own buffer if we need to look at the data for ;; debugging purposes. (setq gds-buffer (get-buffer-create "*gds")) (set-buffer gds-buffer) (erase-buffer) (insert data) (goto-char (point-min)) (if (not (search-forward-regexp "^<\\?xml" nil t)) (message "No XML data from GDS search") (setq xml (xml-parse-region (match-beginning 0) (point-max))))))) ;; Code ends here Now it's just a matter of doing something useful with this, add a couple of options etc... /Mathias