]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/debbugs/debbugs-org.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / debbugs / debbugs-org.el
index 343308e99bf6d5edd2527fda325f27859f76dcae..d49219ff191cbc1b9cf7199e8ed7d6409ac95bc4 100644 (file)
@@ -1,11 +1,11 @@
 ;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
 
-;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <michael.albinus@gmx.org>
 ;; Keywords: comm, hypermedia, maint, outlines
 ;; Package: debbugs
-;; Version: 0.5
+;; Version: 0.6
 
 ;; This file is not part of GNU Emacs.
 
@@ -148,11 +148,10 @@ returned."
   (interactive)
 
   (unwind-protect
-      (let ((date-format "\\([[:digit:]]\\{4\\}\\)-\\([[:digit:]]\\{1,2\\}\\)-\\([[:digit:]]\\{1,2\\}\\)")
-           key val1 val2 phrase severities packages archivedp)
+      ;; Check for the phrase.
+      (let ((phrase (read-string debbugs-gnu-phrase-prompt))
+            key val1 severities packages)
 
-       ;; Check for the phrase.
-       (setq phrase (read-string debbugs-gnu-phrase-prompt))
        (add-to-list 'debbugs-gnu-current-query (cons 'phrase phrase))
 
        ;; The other queries.
@@ -320,10 +319,10 @@ returned."
 
        ;; Handle tags.
        (when (string-match "^\\([0-9.]+\\); \\(.+\\)$" subject)
-         (add-to-list 'tags (match-string 1 subject))
+         (let ((x (match-string 1 subject))) (pushnew x tags :test #'equal))
          (setq subject (match-string 2 subject)))
        (when archived
-         (add-to-list 'tags "ARCHIVE"))
+          (pushnew "ARCHIVE" tags :test #'equal))
        (setq tags
              (mapcar
               ;; Replace all invalid TAG characters by "_".
@@ -418,7 +417,8 @@ the corresponding buffer (e.g. by closing Emacs)."
              "# mode: org\n"
              "# eval: (debbugs-org-mode 1)\n")
       (when debbugs-org-ids
-       (insert "# eval: (sbe \"init\")\n"))
+       (insert (format "# eval: (%s \"init\")\n"
+                       (if (macrop 'org-sbe) "org-sbe" "sbe"))))
       (insert "# End:\n")
       (goto-char (point-min))
       (org-overview)