;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hypermedia
;; Package: debbugs
-;; Version: 0.9.1
-;; Package-Requires: ((async "1.6"))
+;; Version: 0.9.2
+;; Package-Requires: ((soap-client "3.1.1"))
;; This file is not part of GNU Emacs.
(require 'soap-client)
(eval-when-compile (require 'cl))
-(declare-function soap-invoke-async "soap-client")
-(declare-function async-start "async")
-(declare-function async-get "async")
-
(defgroup debbugs nil
"Debbugs library"
:group 'hypermedia)
"The object manipulated by `debbugs-soap-invoke-async'.")
(defun debbugs-soap-invoke-async (operation-name &rest parameters)
- "Invoke the SOAP connection asynchronously.
-If possible, it uses `soap-invoke-async' from soapclient 3.0.
-Otherwise, `async-start' from the async package is used."
- (if (fboundp 'soap-invoke-async)
- ;; This is soap-client 3.0.
- (apply
- 'soap-invoke-async
- (lambda (response &rest args)
- (setq debbugs-soap-invoke-async-object
- (append debbugs-soap-invoke-async-object (car response))))
- nil
- debbugs-wsdl debbugs-port operation-name parameters)
- ;; Fallback with async.
- (async-start
- `(lambda ()
- (load ,(locate-library "soap-client"))
- (apply
- 'soap-invoke
- (soap-load-wsdl
- ,(expand-file-name
- "Debbugs.wsdl"
- (file-name-directory (locate-library "debbugs"))))
- ,debbugs-port ,operation-name ',parameters)))))
+ "Invoke the SOAP connection asynchronously."
+ (apply
+ 'soap-invoke-async
+ (lambda (response &rest args)
+ (setq debbugs-soap-invoke-async-object
+ (append debbugs-soap-invoke-async-object (car response))))
+ nil debbugs-wsdl debbugs-port operation-name parameters))
(defun debbugs-get-bugs (&rest query)
"Return a list of bug numbers which match QUERY.
debbugs-max-hits-per-request))))
(dolist (res results)
- (if (bufferp res)
- ;; This is soap-client 3.0.
- (while (buffer-live-p res)
- (accept-process-output (get-buffer-process res) 0.1))
- ;; Fallback with async.
- (dolist (status (async-get res))
- (setq debbugs-soap-invoke-async-object
- (append debbugs-soap-invoke-async-object status)))))))
+ (while (buffer-live-p res)
+ (accept-process-output (get-buffer-process res) 0.1)))))
(append
cached-bugs
(puthash
(cdr (assoc 'key x))
;; Put also a time stamp.
- (cons (cons 'cache_time (floor (float-time)))
+ (cons (cons 'cache_time (float-time))
(cdr (assoc 'value x)))
debbugs-cache-data)
;; Don't cache.
(let ((phrase (assoc :phrase query))
args result)
- (if (and phrase (not (member :skip phrase)) (not (member :skip phrase)))
+ (if (and phrase (not (member :skip phrase)) (not (member :max phrase)))
;; We loop, until we have all results.
(let ((skip 0)
(query (delete phrase query))