Gnus development mailing list
 help / color / mirror / Atom feed
* Listing inactive groups not working?
@ 2009-08-15 21:34 Justus-bulk
  2009-08-15 21:53 ` Justus-bulk
  2009-09-03  0:12 ` Andreas Politz
  0 siblings, 2 replies; 3+ messages in thread
From: Justus-bulk @ 2009-08-15 21:34 UTC (permalink / raw)
  To: ding

Hi -

[Using Gnus v5.13 with Emacs 23.1.1 on Debian testing] 

I want to inactivate some groups by setting their level to 7, but I
still want them to be listed in the *Group* buffer with 'L'. However,
they do not appear, even though gnus-group-list-inactive-groups is t
(the default).

If the above indicates some misunderstanding on my part, please
interrupt me right here.

Otherwise I'll go on: In gnus-group-prepare-flat, I think the following
code is broken:

	(when (gnus-group-prepare-logic
	       group
	       (and unread		; This group might be unchecked
;;;; For inactive groups, unread is nil, so ...
		    (or (not (stringp regexp))
			(string-match regexp group))
		    (<= (setq clevel (gnus-info-level info)) level)
		    (>= clevel lowest)
		    (cond
		     ((functionp predicate)
		      (funcall predicate info))
		     (predicate t)	; We list all groups?
		     (t
		      (or
		       (if (eq unread t) ; Unactivated?
;;;; ... this condition is never reached:
			   gnus-group-list-inactive-groups
					; We list unactivated
			 (> unread 0))
					; We list groups with unread articles

I changed this code section into the following:

	(when (gnus-group-prepare-logic
	       group
	       (and (or unread gnus-group-list-inactive-groups)
		    (or (not (stringp regexp))
			(string-match regexp group))
		    (<= (setq clevel (gnus-info-level info)) level)
		    (>= clevel lowest)
		    (cond
		     ((functionp predicate)
		      (funcall predicate info))
		     (predicate t)	; We list all groups?
		     (t
		      (or
		       (and (integerp unread) (> unread 0))

On a limited amount of tests, this code behaves as I would expect.  Does
this make sense, or am I misunderstanding what this code is supposed to
do?

Perhaps the real problem is elsewhere: The original code appears to make
perfect sense if gnus-group-unread returns t for inactive groups, but
for me it does not - it returns nil.

Thanks,
Justus



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

* Re: Listing inactive groups not working?
  2009-08-15 21:34 Listing inactive groups not working? Justus-bulk
@ 2009-08-15 21:53 ` Justus-bulk
  2009-09-03  0:12 ` Andreas Politz
  1 sibling, 0 replies; 3+ messages in thread
From: Justus-bulk @ 2009-08-15 21:53 UTC (permalink / raw)
  To: ding

Justus-bulk@Piater.name wrote on Sat, 15 Aug 2009 23:34:20 +0200:

> I want to inactivate some groups by setting their level to 7, but I
> still want them to be listed in the *Group* buffer with 'L'. However,
> they do not appear, even though gnus-group-list-inactive-groups is t
> (the default).

Forgot to mention one important aspect: To this end, I did elevate
gnus-group-default-list-level to 7.



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

* Re: Listing inactive groups not working?
  2009-08-15 21:34 Listing inactive groups not working? Justus-bulk
  2009-08-15 21:53 ` Justus-bulk
@ 2009-09-03  0:12 ` Andreas Politz
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Politz @ 2009-09-03  0:12 UTC (permalink / raw)
  To: ding

Justus-bulk@Piater.name writes:

> Hi -
>
> [Using Gnus v5.13 with Emacs 23.1.1 on Debian testing] 
>
> I want to inactivate some groups by setting their level to 7, but I
> still want them to be listed in the *Group* buffer with 'L'. However,
> they do not appear, even though gnus-group-list-inactive-groups is t
> (the default).
>
[...]
> Otherwise I'll go on: In gnus-group-prepare-flat, I think the following
> code is broken:
>
[...]
> Perhaps the real problem is elsewhere: The original code appears to make
> perfect sense if gnus-group-unread returns t for inactive groups, but
> for me it does not - it returns nil.
>

,----[ (info "(gnus) Gnus Utility Functions") ]
| `gnus-group-unread'
|      The number of unread articles in GROUP, or `t' if that is unknown.
`----

Either this macro is broken and should be like this...

(defmacro gnus-group-unread (group)
  "Get the currently computed number of unread articles in GROUP."
  `(or (car (gnus-gethash ,group gnus-newsrc-hashtb)) t))

, or it's the function/macro which fills the hash with the wrong value.

Either way this would also fix the disappearance of certain unsubscribed
groups.

-ap



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

end of thread, other threads:[~2009-09-03  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-15 21:34 Listing inactive groups not working? Justus-bulk
2009-08-15 21:53 ` Justus-bulk
2009-09-03  0:12 ` Andreas Politz

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).