[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7d20296: Avoid double entries in debbugs
From: |
Michael Albinus |
Subject: |
[elpa] master 7d20296: Avoid double entries in debbugs |
Date: |
Thu, 21 Jun 2018 08:54:22 -0400 (EDT) |
branch: master
commit 7d20296c46cad42dd65d1dd514b93daebea98ee1
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Avoid double entries in debbugs
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-show-reports):
Avoid double entries.
---
packages/debbugs/debbugs-gnu.el | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 4abf3b7..f9383bc 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -706,12 +706,8 @@ are taken from the cache instead."
(sort ids '<))
(debbugs-gnu-get-bugs debbugs-gnu-local-query)))))
(let* ((id (cdr (assq 'id status)))
- (words
- (mapconcat
- 'identity
- (cons (cdr (assq 'severity status))
- (cdr (assq 'keywords status)))
- ","))
+ (words (cons (cdr (assq 'severity status))
+ (cdr (assq 'keywords status))))
(address (if (cdr (assq 'originator status))
(mail-header-parse-address
(decode-coding-string (cdr (assq 'originator status))
@@ -725,19 +721,21 @@ are taken from the cache instead."
'utf-8)))
merged)
(unless (equal (cdr (assq 'pending status)) "pending")
- (setq words (concat words "," (cdr (assq 'pending status)))))
+ (setq words (append words (list (cdr (assq 'pending status))))))
(let ((packages (cdr (assq 'package status))))
(dolist (elt packages)
(when (member elt debbugs-gnu-default-packages)
(setq packages (delete elt packages))))
- (when packages
- (setq words (concat words "," (mapconcat 'identity packages ",")))))
+ (setq words (append words packages)))
(when (setq merged (cdr (assq 'mergedwith status)))
- (setq words (format "%s,%s"
- (if (numberp merged)
- merged
- (mapconcat 'number-to-string merged ","))
- words)))
+ (setq words (cons (if (numberp merged)
+ merged
+ (mapconcat 'number-to-string merged ","))
+ words)))
+ ;; `words' could contain the same word twice, for example
+ ;; "fixed" from keywords and pending.
+ (setq words
+ (mapconcat 'identity (delete-duplicates words :test 'equal) ","))
(when (or (not merged)
(not (let ((found nil))
(dolist (id (if (listp merged)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 7d20296: Avoid double entries in debbugs,
Michael Albinus <=