On Wed, 24 Dec 2003, sryoungs(a)bigpond.net.au wrote:
Here's something I knocked up that I'm thinking about adding
to the
net-utils package. Kick the tyres, take it for a spin around the
block, and tell me what you think.
Barring any negative feedback, I'll probably add it to net-utils
sometime after Chrissy (maybe after New Year's).
When I try to use google-query I get two problems. First,
url-hexify-string is not in "url-util" that is in the autoload
(autoload 'url-hexify-string "url-util")
For me, url-hexify-string is defined in w3/url.el
So I replaced the autoload with
(autoload 'url-hexify-string "url")
Then I got the following error traceback
Signaling: (wrong-type-argument stringp nil)
format(nil)
apply(format nil nil)
working-dynamic-status(nil)
google-query("fan deck")
call-interactively(google-query)
command-execute(google-query t)
execute-extended-command(nil)
call-interactively(execute-extended-command)
This error is coming from working-dynamic-status
which applies args to a null format.
(defun working-dynamic-status (&optional number &rest args)
"Called within the macro `working-status-forms', show the status."
(message "%s%s" (apply 'format msg args)
(format "... %c" (aref [ ?- ?/ ?| ?\\ ] (% ref1 4))))
(setq ref1 (1+ ref1)))
I added a conditional around the message
(when (not (null msg))
...)
And feature request: add result count customization
(defcustom google-query-result-count 10
"number of results"
:type 'number
:group 'google)
And change
(query (concat "search?&q=" str))
to:
(query (concat "search?&q=" str "&num=" (format
"%d" google-query-result-count)))
I am running on (insert-string emacs-version) -
21.4 (patch 6) "Common Lisp" XEmacs Lucid under redhat linux.
-jeff