GNU bug report logs -
#37590
[PATCH]: gnus-group-set-info setdr exception
Previous Next
Reported by: dick <dick.r.chiang <at> gmail.com>
Date: Wed, 2 Oct 2019 19:06:01 UTC
Severity: normal
Tags: patch
Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[0001-Avoid-setcdr-exception-when-gnus-newsrc-alist-is-emp.patch (text/x-diff, inline)]
From 92862ab4d7e9f8400229add13a6e16e437d6dbd3 Mon Sep 17 00:00:00 2001
From: dickmao <none>
Date: Wed, 2 Oct 2019 14:22:26 -0400
Subject: [PATCH] Avoid setcdr exception when gnus-newsrc-alist is empty
Exception occurs when using debbugs-gnu.
* lisp/gnus/gnus-group.el (gnus-group-set-info): check if
gnus-newsrc-alist is a consp
---
lisp/gnus/gnus-group.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 915125b655..bca5d35f24 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4466,11 +4466,14 @@ gnus-group-set-info
(gnus-list-of-unread-articles (car info)))))
;; The above `setcar' will only affect the hashtable, not
;; the alist: update the alist separately.
- (push info (cdr (setq gnus-newsrc-alist
- (remove (assoc-string
- (gnus-info-group info)
- gnus-newsrc-alist)
- gnus-newsrc-alist)))))
+ (setf (alist-get (car info)
+ ;; avoid usurping dummy info at the head
+ ;; of gnus-newsrc-alist
+ (if (consp gnus-newsrc-alist)
+ (cdr gnus-newsrc-alist)
+ gnus-newsrc-alist)
+ nil nil #'equal)
+ (cdr info)))
(error "No such group: %s" (gnus-info-group info))))))
;; Ad-hoc function for inserting data from a different newsrc.eld
--
2.23.0
This bug report was last modified 5 years and 222 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.