Function: debbugs-gnu-query:string

debbugs-gnu-query:string is a byte-compiled function defined in hib-debbugs.el.

Signature

(debbugs-gnu-query:string URL-QUERY-STRING)

Documentation

Show the results of a Gnu debbugs query with attributes from URL-QUERY-STRING.

URL-QUERY-STRING must be a valid URL query string (part after the question mark) of debbugs attributes and values, i.e. "attr1=val1&attr2=val2&attr3=val3" URL encoded characters are decoded. An optional prefix of "bug#<id-number>?" may also be included at the front of the string to limit the query to a particular issue number. Note that issue or debbugs may be used as well in place of bug.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-debbugs.el
(defun debbugs-gnu-query:string (url-query-string)
  "Show the results of a Gnu debbugs query with attributes from URL-QUERY-STRING.
URL-QUERY-STRING must be a valid URL query string (part after the
question mark) of debbugs attributes and values,
i.e. \"attr1=val1&attr2=val2&attr3=val3\" URL encoded characters
are decoded.  An optional prefix of \"bug#<id-number>?\" may also
be included at the front of the string to limit the query to a
particular issue number.  Note that `issue' or `debbugs' may be
used as well in place of `bug'."
  (let* ((case-fold-search t)
	 (id (when (string-match "\\`\\(bug\\|debbugs\\|issue\\)\\s-?#?\\s-?\\(\\([1-9][0-9]*\\)\\|\\?\\)+"
				 url-query-string)
	       (prog1 (match-string 3 url-query-string)
		 (setq url-query-string (substring url-query-string (match-end 0))))))
	 attr-pair-list)
    ;; Change elements from lists to cons pairs.
    (setq attr-pair-list
	  (mapcar (lambda (elt) (cons (car elt) (cadr elt)))
		  (url-parse-query-string url-query-string))) ;; autoloaded
    (when id
      (push (cons 'bugs (list (string-to-number id))) attr-pair-list))
    (debbugs-gnu-query:list attr-pair-list)))