Package: gnus-bonus-el
Version: 34.1

I use `(group "foo" "bar")' constructs in the
`gnus-personality-electric-headers' variable in gnus-pers.el. Sometimes
the matching of group names to desired personality will stop working,
always yielding the default personality.

I eventually tracked it down to being caused by invalid
“,gnus-newsgroup-name”-regexps being cached in
`gnus-personality-split-cache' when gnus-pers was invoked with
`gnus-newsgroup-name' as nil (i.e. no group active at the moment). Once
such entries are cached, the code that actually does matching on group
name is never invoked again, until cache is cleared or the cache alist
akeys (split rules) altered.

I fixed it with the following patch:

--- gnus-pers-orig.el   2010-09-15 22:27:17.597372205 +0200
+++ gnus-pers.el        2010-09-16 03:02:43.087877865 +0200
@@ -831,11 +831,10 @@
             (retval (nthcdr 2 split))
             partial regexp)
        ;; Check to see if it's a "gnus-newsgroup-name" split
-       (if (and gnus-newsgroup-name
-                (equal ",gnus-newsgroup-name" (cdr (assq field 
gnus-personality-split-abbrev-alist))))
-           (let ((groupname gnus-newsgroup-name))
-             (if (string-match value groupname)
-                 retval))
+
+       (if (equal ",gnus-newsgroup-name" (cdr (assq field 
gnus-personality-split-abbrev-alist)))
+        (if (and gnus-newsgroup-name (string-match value gnus-newsgroup-name))
+            retval)
          (progn
 
            (if (symbolp value)


This avoids entering the code path that builds and caches header regexps
associated with personality splitting rules, when the rule is to match
on name of current group in Gnus.

Regards,
Øyvind Stegard
-- 
< Øyvind Stegard
 < http://folk.uio.no/oyvinst/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to