1 ;;; debbugs.el --- SOAP library to access debbugs servers
3 ;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
5 ;; Author: Michael Albinus <michael.albinus@gmx.de>
6 ;; Keywords: comm, hypermedia
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 ;; This package provides some basic functions to access a debbugs SOAP
28 ;; server (see <http://wiki.debian.org/DebbugsSoapInterface>).
30 ;; The SOAP function "get_versions" is not implemented (yet).
34 ;(setq soap-debug t message-log-max t)
35 (require 'soap-client)
36 (eval-when-compile (require 'cl))
42 (defcustom debbugs-servers
44 :wsdl "http://debbugs.gnu.org/cgi/soap.cgi?WSDL"
45 :bugreport-url "http://debbugs.gnu.org/cgi/bugreport.cgi")
47 :wsdl "http://bugs.debian.org/cgi-bin/soap.cgi?WSDL"
48 :bugreport-url "http://bugs.debian.org/cgi-bin/bugreport.cgi"))
49 "*List of Debbugs server specifiers.
50 Each entry is a list that contains a string identifying the port
51 name and the server parameters in keyword-value form. Allowed
54 `:wsdl' -- Location of WSDL. The value is a string with URL that
55 should return the WSDL specification of Debbugs/SOAP service.
57 `:bugreport-url' -- URL of the server script that returns mboxes
60 The list initially contains two predefined and configured Debbugs
61 servers: \"gnu.org\" and \"debian.org\"."
63 :link '(custom-manual "(debbugs)Debbugs server specifiers")
68 (string :tag "Port name")
69 (checklist :tag "Options" :greedy t
71 (const :format "" :value :wsdl)
74 (const :format "" :value :bugreport-url)
75 (string :tag "Bugreport URL")))))))
77 (defcustom debbugs-port "gnu.org"
78 "The port instance to be applied from `debbugs-wsdl'.
79 This corresponds to the Debbugs server to be accessed, either
80 \"gnu.org\", or \"debian.org\", or user defined port name."
81 ;; Maybe we should create an own group?
83 :type '(choice :tag "Debbugs server" (const "gnu.org") (const "debian.org")
84 (string :tag "user defined port name")))
86 ;; It would be nice if we could retrieve it from the debbugs server.
88 (defconst debbugs-wsdl
93 (file-name-directory load-file-name)
95 "The WSDL object to be used describing the SOAP interface.")
97 (defun debbugs-get-bugs (&rest query)
98 "Return a list of bug numbers which match QUERY.
100 QUERY is a sequence of keyword-value pairs where the values are
101 strings, i.e. :KEYWORD \"VALUE\" [:KEYWORD \"VALUE\"]*
103 The keyword-value pair is a subquery. The keywords are allowed to
104 have multiple occurrence within the query at any place. The
105 subqueries with the same keyword form the logical subquery, which
106 returns the union of bugs of every subquery it contains.
108 The result of the QUERY is an intersection of results of all
113 :package -- The value is the name of the package a bug belongs
114 to, like \"emacs\", \"coreutils\", \"gnus\", or \"tramp\".
116 :src -- This is used to retrieve bugs that belong to source
119 :severity -- This is the severity of the bug. The exact set of
120 allowed values depends on the Debbugs port. Examples are
121 \"normal\", \"minor\", \"wishlist\" etc.
123 :tag -- An arbitrary string the bug is annotated with.
124 Usually, this is used to mark the status of the bug, like
125 \"fixed\", \"moreinfo\", \"notabug\", \"patch\",
126 \"unreproducible\" or \"wontfix\". The exact set of tags
127 depends on the Debbugs port.
129 :owner -- This is used to identify bugs by the owner's email
130 address. The special email address \"me\" is used as pattern,
131 replaced with `user-mail-address'.
133 :submitter -- With this keyword it is possible to filter bugs
134 by the submitter's email address. The special email address
135 \"me\" is used as pattern, replaced with `user-mail-address'.
137 :maint -- This is used to find bugs of the packages which are
138 maintained by the person with the given email address. The
139 special email address \"me\" is used as pattern, replaced with
142 :correspondent -- This allows to find bug reports where the
143 person with the given email address has participated. The
144 special email address \"me\" is used as pattern, replaced with
147 :affects -- With this keyword it is possible to find bugs which
148 affect the package with the given name. The bugs are chosen by
149 the value of field `affects' in bug's status. The returned bugs
150 do not necessary belong to this package.
152 :status -- Status of bug. Valid values are \"done\",
153 \"forwarded\" and \"open\".
155 :archive -- A keyword to filter for bugs which are already
156 archived, or not. Valid values are \"0\" (not archived),
157 \"1\" (archived) or \"both\". If this keyword is not given in
158 the query, `:archive \"0\"' is assumed by default.
160 Example. Get all opened and forwarded release critical bugs for
161 the packages which are maintained by \"me\" and which have a
164 \(debbugs-get-bugs :maint \"me\" :tag \"patch\"
165 :severity \"critical\"
168 :status \"forwarded\"
169 :severity \"serious\")"
171 (let (vec kw key val)
173 (while (and (consp query) (<= 2 (length query)))
176 (unless (and (keywordp kw) (stringp val))
177 (error "Wrong query: %s %s" kw val))
178 (setq key (substring (symbol-name kw) 1))
180 ((:package :severity :tag :src :affects)
181 ;; Value shall be one word.
182 (if (string-match "\\`\\S-+\\'" val)
183 (setq vec (vconcat vec (list key val)))
184 (error "Wrong %s: %s" key val)))
185 ((:owner :submitter :maint :correspondent)
186 ;; Value is an email address.
187 (if (string-match "\\`\\S-+\\'" val)
189 (when (string-equal "me" val)
190 (setq val user-mail-address))
191 (when (string-match "<\\(.+\\)>" val)
192 (setq val (match-string 1 val)))
193 (setq vec (vconcat vec (list key val))))
194 (error "Wrong %s: %s" key val)))
196 ;; Possible values: "done", "forwarded" and "open"
197 (if (string-match "\\`\\(done\\|forwarded\\|open\\)\\'" val)
198 (setq vec (vconcat vec (list key val)))
199 (error "Wrong %s: %s" key val)))
201 ;; Value is `0' or `1' or `both'.
202 (if (string-match "\\`\\(0\\|1\\|both\\)\\'" val)
203 (setq vec (vconcat vec (list key val)))
204 (error "Wrong %s: %s" key val)))
205 (t (error "Unknown key: %s" kw))))
208 (error "Unknown key: %s" (car query)))
209 (sort (car (soap-invoke debbugs-wsdl debbugs-port "get_bugs" vec)) '<)))
211 (defun debbugs-newest-bugs (amount)
212 "Return the list of bug numbers, according to AMOUNT (a number) latest bugs."
213 (sort (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) '<))
215 (defun debbugs-get-status (&rest bug-numbers)
216 "Return a list of status entries for the bugs identified by BUG-NUMBERS.
218 Every returned entry is an association list with the following attributes:
220 `bug_num': The bug number.
222 `package': A list of package names the bug belongs to.
224 `severity': The severity of the bug report. This can be
225 \"important\", \"grave\", \"normal\", \"minor\" or \"wishlist\".
227 `tags': The status of the bug report, a list of strings. This
228 can be \"fixed\", \"notabug\", \"wontfix\", \"unreproducible\",
229 \"moreinfo\" or \"patch\".
231 `pending': The string \"pending\", \"forwarded\" or \"done\".
233 `subject': Subject/Title of the bugreport.
235 `originator': Submitter of the bugreport.
237 `mergedwith': A list of bug numbers this bug was merged with.
239 `source': Source package name of the bug report.
241 `date': Date of bug creation.
243 `log_modified', `last_modified': Date of last update.
245 `found_date', `fixed_date': Date of bug report / bug fix
248 `done': The email address of the worker who has closed the bug (if done).
250 `archived': `t' if the bug is archived, `nil' otherwise.
252 `unarchived': The date the bug has been unarchived, if ever.
254 `found_versions', `fixed_versions': List of version strings.
256 `forwarded': A URL or an email address.
258 `blocks': A list of bug numbers this bug blocks.
260 `blockedby': A list of bug numbers this bug is blocked by.
262 `msgid': The message id of the initial bug report.
264 `owner': Who is responsible for fixing.
266 `location': Always the string \"db-h\" or \"archive\".
268 `affects': A list of package names.
270 `summary': Arbitrary text.
274 \(debbugs-get-status 10)
276 => ;; Attributes with empty values are not shown
278 \(source . \"unknown\")
279 \(date . 1203606305.0)
280 \(msgid . \"<87zltuz7eh.fsf@freemail.hu>\")
281 \(severity . \"wishlist\")
282 \(owner . \"Magnus Henoch <mange@freemail.hu>\")
283 \(log_modified . 1261079402.0)
284 \(location . \"db-h\")
285 \(subject . \"url-gw should support HTTP CONNECT proxies\")
286 \(originator . \"Magnus Henoch <mange@freemail.hu>\")
287 \(last_modified . 1271200046.0)
288 \(pending . \"pending\")
289 \(package \"emacs\")))"
294 debbugs-wsdl debbugs-port "get_status"
295 (apply 'vector bug-numbers)))))
299 ;; "archived" is the number 1 or 0.
300 (setq y (assoc 'archived (cdr (assoc 'value x))))
301 (setcdr y (= (cdr y) 1))
302 ;; "found_versions" and "fixed_versions" are lists,
303 ;; containing strings or numbers.
304 (dolist (attribute '(found_versions fixed_versions))
305 (setq y (assoc attribute (cdr (assoc 'value x))))
307 (lambda (z) (if (numberp z) (number-to-string z) z))
309 ;; "mergedwith" is a string, containing blank separated bug numbers.
310 (setq y (assoc 'mergedwith (cdr (assoc 'value x))))
311 (when (stringp (cdr y))
312 (setcdr y (mapcar 'string-to-number (split-string (cdr y) " " t))))
313 ;; "package" is a string, containing comma separated
314 ;; package names. "keywords" and "tags" are strings,
315 ;; containing blank separated package names.
316 (dolist (attribute '(package keywords tags))
317 (setq y (assoc attribute (cdr (assoc 'value x))))
318 (when (stringp (cdr y))
319 (setcdr y (split-string (cdr y) ",\\| " t))))
320 (cdr (assoc 'value x))))
323 (defun debbugs-get-usertag (&rest query)
324 "Return a list of bug numbers which match QUERY.
326 QUERY is a sequence of keyword-value pairs where the values are
327 strings, i.e. :KEYWORD \"VALUE\" [:KEYWORD \"VALUE\"]*
331 :user -- The value is the name of the package a bug belongs to,
332 like \"emacs\", \"coreutils\", \"gnus\", or \"tramp\". It can
333 also be an email address of a user who has applied a user tag.
334 The special email address \"me\" is used as pattern, replaced
335 with `user-mail-address'. There must be at least one such
336 entry; it is recommended to have exactly one.
338 :tag -- A string applied as user tag. Often, it is a
339 subproduct identification, like \"cedet\" or \"tramp\" for the
342 If there is no :tag entry, no bug numbers will be returned but a list of
343 existing user tags for :user.
347 \(debbugs-get-usertag :user \"emacs\")
349 => (\"www\" \"solaris\" \"ls-lisp\" \"cygwin\")
351 \(debbugs-get-usertag :user \"emacs\" :tag \"www\" :tag \"cygwin\")
355 (let (user tags kw key val object result)
357 (while (and (consp query) (<= 2 (length query)))
360 (unless (and (keywordp kw) (stringp val))
361 (error "Wrong query: %s %s" kw val))
362 (setq key (substring (symbol-name kw) 1))
365 ;; Value shall be one word. Extract email address, if existing.
366 (if (string-match "\\`\\S-+\\'" val)
368 (when (string-equal "me" val)
369 (setq val user-mail-address))
370 (when (string-match "<\\(.+\\)>" val)
371 (setq val (match-string 1 val)))
372 (add-to-list 'user val))
373 (error "Wrong %s: %s" key val)))
375 ;; Value shall be one word.
376 (if (string-match "\\`\\S-+\\'" val)
377 (add-to-list 'tags val)
378 (error "Wrong %s: %s" key val)))
379 (t (error "Unknown key: %s" kw))))
382 (error "Unknown key: %s" (car query)))
383 (unless (= (length user) 1)
384 (error "There must be exactly one :user entry"))
388 (car (soap-invoke debbugs-wsdl debbugs-port "get_usertag" (car user))))
391 ;; Return the list of existing tags.
392 (mapcar (lambda (x) (symbol-name (car x))) object)
394 ;; Return bug numbers.
395 (dolist (elt object result)
396 (when (member (symbol-name (car elt)) tags)
397 (setq result (append (cdr elt) result)))))))
399 (defun debbugs-get-bug-log (bug-number)
400 "Return a list of messages related to BUG-NUMBER.
402 Every message is an association list with the following attributes:
404 `msg_num': The number of the message inside the bug log. The
405 numbers are ascending, newer messages have a higher number.
407 `header': The message header lines, as arrived at the bug tracker.
409 `body': The message body.
411 `attachments' A list of possible attachments, or `nil'. Not
412 implemented yet server side."
413 (car (soap-invoke debbugs-wsdl debbugs-port "get_bug_log" bug-number)))
415 (defun debbugs-search-est (&rest query)
416 "Return the result of a full text search according to QUERY.
418 QUERY is a sequence of lists of keyword-value pairs where the
419 values are strings or numbers, i.e. :KEYWORD \"VALUE\" [:KEYWORD
422 Every sublist of the QUERY forms a hyperestraier condition. A
423 detailed description of hyperestraier conditions can be found at
424 URL `http://fallabs.com/hyperestraier/uguide-en.html#searchcond'.
426 The following conditions are possible:
428 \[:phrase SEARCH-PHRASE :skip NUMBER :max NUMBER\]
430 The string SEARCH-PHRASE forms the search on the database. It
431 contains words to be searched for, combined by operators like
432 AND, ANDNOT and OR. If there is no operator between the words,
433 AND is used by default. The phrase keyword and value can also
434 be omitted, this is useful in combination with other conditions.
436 :skip and :max are optional. They specify, how many hits are
437 skipped, and how many maximal hits are returned. This can be
438 used for paged results. Per default, :skip is 0 and :max is 10.
440 There must be exactly one such condition.
442 \[ATTRIBUTE VALUE+ :operation OPERATION :order ORDER\]
444 ATTRIBUTE is one of the following keywords:
446 :status -- Status of bug. Valid values are \"done\",
447 \"forwarded\" and \"open\".
449 :subject, :@title -- The subject of a message or the title of
452 :date, :@cdate -- The submission or modification dates of a
455 :submitter, :@author -- The email address of the submitter of a
456 bug or the author of a message belonging to this bug, a string.
457 The special email address \"me\" is used as pattern, replaced
458 with `user-mail-address'.
460 :package -- The value is the name of the package a bug belongs
461 to, like \"emacs\", \"coreutils\", \"gnus\", or \"tramp\".
463 :tags -- An arbitrary string the bug is annotated with.
465 :severity -- This is the severity of the bug. The exact set of
466 allowed values depends on the Debbugs port. Examples are
467 \"normal\", \"minor\", \"wishlist\" etc.
469 :operator defines the comparison operator to be applied to
470 ATTRIBUTE. For string attributes this could be \"STREQ\" \(is
471 equal to the string), \"STRNE\" \(is not equal to the string),
472 \"STRINC\" \(includes the string), \"STRBW\" \(begins with the
473 string), \"STREW\" \(ends with the string), \"STRAND\"
474 \(includes all tokens in the string), \"STROR\" \(includes at
475 least one token in the string), \"STROREQ\" \(is equal to at
476 least one token in the string) or \"STRRX\" \(matches regular
477 expressions of the string). For operators with tokens, several
478 values for ATTRIBUTE shall be used.
480 Numbers can be compared by the operators \"NUMEQ\" \(is equal
481 to the number), \"NUMNE\" \(is not equal to the number),
482 \"NUMGT\" \(is greater than the number), \"NUMGE\" \(is greater
483 than or equal to the number), \"NUMLT\" \(is less than the
484 number), \"NUMLE\" \(is less than or equal to the number) or
485 \"NUMBT\" \(is between the two numbers). In the last case,
486 there must be two values for ATTRIBUTE.
488 If an operator is leaded by \"!\", the meaning is inverted. If
489 a string operator is leaded by \"I\", the case of the value is
492 The optional :order can be specified only in one condition. It
493 means, that ATTRIBUTE is used for sorting the results. The
494 following order operators exist: \"STRA\" \(ascending by
495 string), \"STRD\" \(descending by string), \"NUMA\" \(ascending
496 by number) or \"NUMD\" \(descending by number).
498 A special case is an :order, where there is no corresponding
499 attribute value and no operator. In this case, ATTRIBUTE is
500 not used for the search.
502 The result of the QUERY is a list of association lists with the
503 same attributes as in the conditions. Additional attributes are
505 `id': The bug number.
507 `msg_num': The number of the message inside the bug log.
509 `snippet': The surrounding text found by the search. For the
510 syntax of the snippet, consult the hyperestraier user guide.
515 '\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
516 '\(:severity \"normal\" :operator \"STRINC\")
517 '\(:date :order \"NUMA\"))
519 => \(\(\(msg_num . 21)
521 \(@author . \"Glenn Morris <rgm@gnu.org>\")
522 \(@title . \"Re: bug#1567: Mailing an archived bug\")
524 \(severity . \"normal\")
525 \(@cdate . \"Wed, 17 Dec 2008 14:34:50 -0500\")
527 \(subject . \"Mailing an archived bug\")
528 \(package . \"debbugs.gnu.org\"))
531 ;; Show all messages from me between 2011-08-01 and 2011-08-31.
534 '\(:@author \"me\" :operator \"ISTRINC\")
536 ,\(floor \(float-time \(encode-time 0 0 0 1 8 2011)))
537 ,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
538 :operator \"NUMBT\"))"
541 ;; Compile search arguments.
544 phrase-cond attr-cond)
546 ;; Phrase is mandatory, even if empty.
547 (when (and (or (member :skip elt) (member :max elt))
548 (not (member :phrase elt)))
549 (setq vec (vector "phrase" "")))
554 (unless (keywordp kw)
555 (error "Wrong keyword: %s" kw))
556 (setq key (substring (symbol-name kw) 1))
560 ;; It shouldn't happen in an attribute condition.
562 (error "Wrong keyword: %s" kw))
563 (setq phrase-cond t val (pop elt))
564 ;; Value is a string.
566 (setq vec (vconcat vec (list key val)))
567 (error "Wrong %s: %s" key val)))
570 ;; It shouldn't happen in an attribute condition.
572 (error "Wrong keyword: %s" kw))
573 (setq phrase-cond t val (pop elt))
574 ;; Value is a number.
576 (setq vec (vconcat vec (list key (number-to-string val))))
577 (error "Wrong %s: %s" key val)))
579 ;; Attribute condition.
580 ((:submitter :@author)
581 ;; It shouldn't happen in a phrase condition.
583 (error "Wrong keyword: %s" kw))
584 (if (not (stringp (car elt)))
585 (setq vec (vconcat vec (list key "")))
586 ;; Value is an email address.
587 (while (and (stringp (car elt))
588 (string-match "\\`\\S-+\\'" (car elt)))
589 (when (string-equal "me" (car elt))
590 (setcar elt user-mail-address))
591 (when (string-match "<\\(.+\\)>" (car elt))
592 (setcar elt (match-string 1 (car elt))))
593 (add-to-list 'val (pop elt) 'append))
595 (vconcat vec (list key (mapconcat 'identity val " "))))))
598 ;; It shouldn't happen in a phrase condition.
600 (error "Wrong keyword: %s" kw))
602 (if (not (stringp (car elt)))
603 (setq vec (vconcat vec (list key "")))
604 ;; Possible values: "done", "forwarded" and "open"
605 (while (and (stringp (car elt))
607 "\\`\\(done\\|forwarded\\|open\\)\\'" (car elt)))
608 (add-to-list 'val (pop elt) 'append))
610 (vconcat vec (list key (mapconcat 'identity val " "))))))
612 ((:subject :package :tags :severity :@title)
613 ;; It shouldn't happen in a phrase condition.
615 (error "Wrong keyword: %s" kw))
617 (if (not (stringp (car elt)))
618 (setq vec (vconcat vec (list key "")))
620 (while (stringp (car elt))
621 (add-to-list 'val (pop elt) 'append))
623 (vconcat vec (list key (mapconcat 'identity val " "))))))
626 ;; It shouldn't happen in a phrase condition.
628 (error "Wrong keyword: %s" kw))
630 (if (not (numberp (car elt)))
631 (setq vec (vconcat vec (list key "")))
633 (while (numberp (car elt))
634 (add-to-list 'val (pop elt) 'append))
637 vec (list key (mapconcat 'number-to-string val " "))))))
640 ;; It shouldn't happen in a phrase condition.
642 (error "Wrong keyword: %s" kw))
643 (setq attr-cond t val (pop elt))
644 ;; Value is a number.
646 (setq vec (vconcat vec (list key val)))
647 (error "Wrong %s: %s" key val)))
649 (t (error "Unknown key: %s" kw))))
651 (setq args (vconcat args (list vec)))))
654 (car (soap-invoke debbugs-wsdl debbugs-port "search_est" args)))
655 ;; The result contains lists (key value). We transform it into
656 ;; cons cells (key . value).
657 (dolist (elt1 result result)
659 (setcdr elt2 (cadr elt2))))))
661 (defun debbugs-get-attribute (bug-or-message attribute)
662 "Return the value of key ATTRIBUTE.
664 BUG-OR-MESSAGE must be list element returned by either
665 `debbugs-get-status' or `debbugs-get-bug-log'.
667 Example: Return the originator of last submitted bug.
669 \(debbugs-get-attribute
670 \(car \(apply 'debbugs-get-status \(debbugs-newest-bugs 1))) 'originator)"
671 (cdr (assoc attribute bug-or-message)))
673 (defun debbugs-get-message-numbers (messages)
674 "Return the message numbers of MESSAGES.
675 MESSAGES must be the result of a `debbugs-get-bug-log' call."
676 (mapcar (lambda (x) (debbugs-get-attribute x 'msg_num)) messages))
678 (defun debbugs-get-message (messages message-number)
679 "Return the message MESSAGE-NUMBER of MESSAGES.
680 MESSAGES must be the result of a `debbugs-get-bug-log' call.
682 The returned message is a list of strings. The first element are
683 the header lines of the message, the second element is the body
684 of the message. Further elements of the list, if any, are
685 attachments of the message.
687 If there is no message with MESSAGE-NUMBER, the function returns `nil'.
689 Example: Return the first message of last submitted bug.
691 \(let \(\(messages \(apply 'debbugs-get-bug-log \(debbugs-newest-bugs 1))))
692 \(debbugs-get-message messages
693 \(car \(debbugs-get-message-numbers messages))))"
695 (/= (debbugs-get-attribute (car messages) 'msg_num)
697 (setq messages (cdr messages)))
699 (append (list (debbugs-get-attribute (car messages) 'header)
700 (debbugs-get-attribute (car messages) 'body))
701 (debbugs-get-attribute (car messages) 'attachments))))
703 (defun debbugs-get-mbox (bug-number mbox-type &optional filename)
704 "Download mbox with messages of bug BUG-NUMBER from Debbugs server.
705 BUG-NUMBER is a number of bug. It must be of integer type.
707 MBOX-TYPE specifies a type of mbox and can be one of the
710 `mboxfolder': Download mbox folder.
712 `mboxmaint': Download maintainer's mbox.
714 `mboxstat', `mboxstatus': Download status mbox. The use of
715 either symbol depends on actual Debbugs server configuration.
716 For gnu.org, use the former; for debian.org - the latter.
718 FILENAME, if non-`nil', is the name of file to store mbox. If
719 FILENAME is `nil', the downloaded mbox is inserted into the
721 (let (url (mt "") bn)
722 (unless (setq url (plist-get
723 (cdr (assoc debbugs-port debbugs-servers))
725 (error "URL of bugreport script for port %s is not specified"
727 (setq bn (format "bug=%s;" (number-to-string bug-number)))
728 (unless (eq mbox-type 'mboxfolder)
729 (if (memq mbox-type '(mboxmaint mboxstat mboxstatus))
730 (setq mt (concat (symbol-name mbox-type) "=yes;"))
731 (error "Unknown mbox type: %s" mbox-type)))
732 (setq url (concat url (format "?%s%smbox=yes" bn mt)))
734 (url-copy-file url filename t)
735 (url-insert-file-contents url))))
741 ;; * SOAP interface extensions (wishlist).
742 ;; - Server-side sorting.
743 ;; - Regexp and/or wildcards search.
744 ;; - Returning message attachments.
746 ;;; debbugs.el ends here