]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/debbugs/debbugs-org.el
Release debbugs 0.9.6.
[gnu-emacs-elpa] / packages / debbugs / debbugs-org.el
index a95672d5a9fec666620b58eaf523b931a979c92c..71adf1de03233dd36a0cf6b7cdfa4d68d334391f 100644 (file)
@@ -1,4 +1,4 @@
-;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
+;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 
 (require 'debbugs-gnu)
 (require 'org)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;; Buffer-local variables.
 (defvar debbugs-gnu-local-query)
 (defconst debbugs-org-severity-priority
   (let ((priority ?A))
     (mapcar
-     (lambda (x) (prog1 (cons x (char-to-string priority)) (incf priority)))
+     (lambda (x) (prog1 (cons x (char-to-string priority)) (cl-incf priority)))
      debbugs-gnu-all-severities))
   "Mapping of debbugs severities to TODO priorities.")
 
@@ -195,6 +195,12 @@ returned."
        ;; Do the search.
        (debbugs-org severities packages))))
 
+;;;###autoload
+(defun debbugs-org-patches ()
+  "List the bug reports that have been marked as containing a patch."
+  (interactive)
+  (debbugs-org nil debbugs-gnu-default-packages nil nil "patch"))
+
 ;;;###autoload
 (defun debbugs-org (severities &optional packages archivedp suppress tags)
   "List all outstanding bugs."
@@ -288,10 +294,10 @@ returned."
 
        ;; Handle tags.
        (when (string-match "^\\([0-9.]+\\); \\(.+\\)$" subject)
-         (let ((x (match-string 1 subject))) (pushnew x tags :test #'equal))
+         (let ((x (match-string 1 subject))) (cl-pushnew x tags :test #'equal))
          (setq subject (match-string 2 subject)))
        (when archived
-          (pushnew "ARCHIVE" tags :test #'equal))
+          (cl-pushnew "ARCHIVE" tags :test #'equal))
        (setq tags
              (mapcar
               ;; Replace all invalid TAG characters by "_".