Gnus development mailing list
 help / color / mirror / Atom feed
* Topic parameters are broken.
@ 2002-05-05  3:15 Matt Armstrong
  2002-05-05 10:02 ` Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Armstrong @ 2002-05-05  3:15 UTC (permalink / raw)


I've been working on a patch to gnus that introduces a new group
parameter.  In testing, I found that topic parameters are broken.

Per Abrahamsen made the following change to gnus-group-find-parameter
back in October to help make "mail-followup-to" generation faster.
(this is in revision 6.60 of gnus.el).

The original version always called the
gnus-group-get-parameter-function function, which in topic mode grabs
the topic mode parameters and concatenates them together before
searching for the group parameter value.

The new version skips this, so topic parameters will always be ignored
when using gnus-group-find-parameter to look for a specific parameter.

Should this change be backed out?


 (defun gnus-group-find-parameter (group &optional symbol allow-list)
   "Return the group parameters for GROUP.
-If SYMBOL, return the value of that symbol in the group parameters."
+If SYMBOL, return the value of that symbol in the group parameters.
+
+If you call this function inside a loop, consider using the faster
+`gnus-group-fast-parameter' instead."
   (save-excursion
     (set-buffer gnus-group-buffer)
-    (let ((parameters
-          (nconc
-           (copy-sequence
-            (funcall gnus-group-get-parameter-function group))
-           (gnus-parameters-get-parameter group))))
-      (if symbol
-         (gnus-group-parameter-value parameters symbol allow-list)
+    (if symbol
+       (gnus-group-fast-parameter group symbol allow-list)
+      (let ((parameters
+            (nconc
+             (copy-sequence
+              (funcall gnus-group-get-parameter-function group))
+             (gnus-parameters-get-parameter group))))
        parameters))))


-- 
Don't send mail to Jesse.Holm@hole.lickey.com
The address is there for spammers to harvest.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Topic parameters are broken.
  2002-05-05  3:15 Topic parameters are broken Matt Armstrong
@ 2002-05-05 10:02 ` Simon Josefsson
  2002-05-05 12:38   ` Matt Armstrong
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2002-05-05 10:02 UTC (permalink / raw)
  Cc: ding

Matt Armstrong <matt@lickey.com> writes:

> Per Abrahamsen made the following change to gnus-group-find-parameter
> back in October to help make "mail-followup-to" generation faster.
> (this is in revision 6.60 of gnus.el).
>
> The original version always called the
> gnus-group-get-parameter-function function, which in topic mode grabs
> the topic mode parameters and concatenates them together before
> searching for the group parameter value.
>
> The new version skips this, so topic parameters will always be ignored
> when using gnus-group-find-parameter to look for a specific parameter.

I don't understand -- the new function calls
`gnus-group-fast-parameter' which does funcall
`gnus-group-get-parameter-function' so all seems fine.

Setting the `dummy' parameter on the top-level "Gnus" topic and then
calling (gnus-group-find-parameter "nnimap+yxa:INBOX" 'dummy) works
for me.  Can you elobarate on what it is that is not working?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Topic parameters are broken.
  2002-05-05 10:02 ` Simon Josefsson
@ 2002-05-05 12:38   ` Matt Armstrong
  2002-05-05 13:08     ` Matt Armstrong
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Armstrong @ 2002-05-05 12:38 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> I don't understand -- the new function calls
> `gnus-group-fast-parameter' which does funcall
> `gnus-group-get-parameter-function' so all seems fine.

So it does!  Please ignore me until I start making sense again.


-- 
Don't send mail to Sonja.Landers@hole.lickey.com
The address is there for spammers to harvest.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Topic parameters are broken.
  2002-05-05 12:38   ` Matt Armstrong
@ 2002-05-05 13:08     ` Matt Armstrong
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Armstrong @ 2002-05-05 13:08 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> I don't understand -- the new function calls
>> `gnus-group-fast-parameter' which does funcall
>> `gnus-group-get-parameter-function' so all seems fine.
>
> So it does!  Please ignore me until I start making sense again.

It turns out that I was not insane and that
gnus-group-topic-parameters seems to have a bug that I haven't yet
been able to characterize.

There was one case where setting (visible . t) in one topic caused a
different topic to show all of its groups (after pressing g in the
group buffer).  This corresponds with the work I was doing -- the
topic parameters were actually affecting a different topic from the
one they were set in, so I thought they were not being used at all.

But now after fiddling with it Gnus is doing the right thing.  I have
not figured out what caused it to break or what fixed it.  :-(


-- 
Don't send mail to Laurie.Ferguson@hole.lickey.com
The address is there for spammers to harvest.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-05 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-05  3:15 Topic parameters are broken Matt Armstrong
2002-05-05 10:02 ` Simon Josefsson
2002-05-05 12:38   ` Matt Armstrong
2002-05-05 13:08     ` Matt Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).