Gnus development mailing list
 help / color / mirror / Atom feed
* nnvirtual counts messages but gives an error
@ 2022-05-04 12:51 Erik Colson
  2022-05-04 17:10 ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Colson @ 2022-05-04 12:51 UTC (permalink / raw)
  To: ding

Hi,

I defined a nnvirtual group and when I refresh the count in the group
list, the count is correct.  So I guess my group definition is correct
too.
For the record it is `(nnvirtual "Inbox")`

When I hit enter to view the articles I get following error

  `gnus-cache-articles-in-group: Wrong type argument: hash-table-p, nil`

Why did I do incorrectly?
-- 
erik colson


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

* Re: nnvirtual counts messages but gives an error
  2022-05-04 12:51 nnvirtual counts messages but gives an error Erik Colson
@ 2022-05-04 17:10 ` Eric Abrahamsen
  2022-05-04 21:53   ` Erik Colson
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2022-05-04 17:10 UTC (permalink / raw)
  To: ding

Erik Colson <eco@ecocode.net> writes:

> Hi,
>
> I defined a nnvirtual group and when I refresh the count in the group
> list, the count is correct.  So I guess my group definition is correct
> too.
> For the record it is `(nnvirtual "Inbox")`
>
> When I hit enter to view the articles I get following error
>
>   `gnus-cache-articles-in-group: Wrong type argument: hash-table-p, nil`
>
> Why did I do incorrectly?

Can you set `toggle-debug-on-error' to t, trigger the error again,
and post the backtrace here?

Also, if you have a new enough Emacs, the nnselect backend is probably a
better choice for producing this "virtual" type behavior.



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

* Re: nnvirtual counts messages but gives an error
  2022-05-04 17:10 ` Eric Abrahamsen
@ 2022-05-04 21:53   ` Erik Colson
  2022-05-05  1:53     ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Colson @ 2022-05-04 21:53 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Can you set `toggle-debug-on-error' to t, trigger the error again,
> and post the backtrace here?

Here it is:

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  gnus-cache-update-active("FASTMAIL/Inbox" 2664 t)
  gnus-cache-articles-in-group("FASTMAIL/Inbox")
  gnus-cache-retrieve-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...) "FASTMAIL/Inbox" nil)
  gnus-retrieve-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...) "FASTMAIL/Inbox" nil)
  nnvirtual-retrieve-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...) "Inboxes" "Inbox" t)
  gnus-retrieve-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...) "nnvirtual:Inboxes" t)
  gnus-fetch-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...))
  gnus-select-newsgroup("nnvirtual:Inboxes" nil nil)
  gnus-summary-read-group-1("nnvirtual:Inboxes" nil t nil nil nil)
  gnus-summary-read-group("nnvirtual:Inboxes" nil t nil nil nil nil)
  gnus-group-read-group(nil t)
  gnus-group-select-group(nil)
  gnus-topic-select-group(nil)
  funcall-interactively(gnus-topic-select-group nil)
  command-execute(gnus-topic-select-group)

> Also, if you have a new enough Emacs, the nnselect backend is probably a
> better choice for producing this "virtual" type behavior.

Yep, that is what I was looking for first, but my problem with saving
expiry marks (see other thread) in nnselect made me try nnvirtual.

thx
-- 
erik colson


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

* Re: nnvirtual counts messages but gives an error
  2022-05-04 21:53   ` Erik Colson
@ 2022-05-05  1:53     ` Eric Abrahamsen
  2022-05-05  9:59       ` Erik Colson
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2022-05-05  1:53 UTC (permalink / raw)
  To: ding

Erik Colson <eco@ecocode.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Can you set `toggle-debug-on-error' to t, trigger the error again,
>> and post the backtrace here?
>
> Here it is:
>
> Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
>   gnus-cache-update-active("FASTMAIL/Inbox" 2664 t)
>   gnus-cache-articles-in-group("FASTMAIL/Inbox")
>   gnus-cache-retrieve-headers((4 5 9 10 11 14 22 23 24 25 26 27 30 32 34 35 38 40 41 43 48 49 51 52 53 54 55 58 60 62 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 89 90 92 ...) "FASTMAIL/Inbox" nil)

Let's see...

The `gnus-cache-open' function is called at startup, so long as
`gnus-use-cache is non-nil.

When `gnus-cache-open' is called, it will call `gnus-cache-read-active',
which will always create the hash table in question, one way or the
other. The only way it will not call `gnus-cache-read-active' is if this
test fails to pass:

(or (file-exists-p gnus-cache-directory)
    (and gnus-use-cache
	 (not (eq gnus-use-cache 'passive))))

I'm guessing your `gnus-cache-directory' points to a non-existent
directory? I'm also assuming your `gnus-use-cache' is 'passive.

It's a bit weird, though -- if the directory doesn't exist but
`gnus-use-cache' is non-nil, it seems like Gnus should either create the
directory, or just not attempt to use the cache.

As it is, `gnus-cache-read-active' creates the cache directory, but only
if... it already exists.



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

* Re: nnvirtual counts messages but gives an error
  2022-05-05  1:53     ` Eric Abrahamsen
@ 2022-05-05  9:59       ` Erik Colson
  2022-05-05 15:13         ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Colson @ 2022-05-05  9:59 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> The `gnus-cache-open' function is called at startup, so long as
> `gnus-use-cache is non-nil.

As I use a local dovecot server I've set gnus-use-cache to nil.  As
everything is really already speedy, I would love not to have a cache of
data I already have on my machine..
Tell me if I should put it to 'passive.

thx
-- 
erik colson


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

* Re: nnvirtual counts messages but gives an error
  2022-05-05  9:59       ` Erik Colson
@ 2022-05-05 15:13         ` Eric Abrahamsen
  2022-05-05 18:42           ` Erik Colson
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2022-05-05 15:13 UTC (permalink / raw)
  To: ding

Erik Colson <eco@ecocode.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> The `gnus-cache-open' function is called at startup, so long as
>> `gnus-use-cache is non-nil.
>
> As I use a local dovecot server I've set gnus-use-cache to nil.  As
> everything is really already speedy, I would love not to have a cache of
> data I already have on my machine..
> Tell me if I should put it to 'passive.

Oh yuck, this lead me to the "FIX FIX FIX" code comment in nnvirtual:
nnvirtual-retrieve-headers forces gnus-use-cache to t when it calls back
to gnus-retrieve-headers. So it's insisting you use the cache, even if
you have that set to nil. This code is at least 25 years old, and I
would need to spend a bit of time with it to understand why it's doing
this. Probably I should open a bug report and see if Lars still
remembers what's going on there.

Another reason to use nnselect instead!



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

* Re: nnvirtual counts messages but gives an error
  2022-05-05 15:13         ` Eric Abrahamsen
@ 2022-05-05 18:42           ` Erik Colson
  0 siblings, 0 replies; 7+ messages in thread
From: Erik Colson @ 2022-05-05 18:42 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Oh yuck, this lead me to the "FIX FIX FIX" code comment in nnvirtual:
> nnvirtual-retrieve-headers forces gnus-use-cache to t when it calls back
> to gnus-retrieve-headers. So it's insisting you use the cache, even if
> you have that set to nil. This code is at least 25 years old, and I
> would need to spend a bit of time with it to understand why it's doing
> this. Probably I should open a bug report and see if Lars still
> remembers what's going on there.
>
> Another reason to use nnselect instead!

OK, I removed the nnvirtual group and leave gnus-use-cache to nil, so
another reason to debug the nnselect expiry bug ;)

-- 
erik colson


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

end of thread, other threads:[~2022-05-05 18:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 12:51 nnvirtual counts messages but gives an error Erik Colson
2022-05-04 17:10 ` Eric Abrahamsen
2022-05-04 21:53   ` Erik Colson
2022-05-05  1:53     ` Eric Abrahamsen
2022-05-05  9:59       ` Erik Colson
2022-05-05 15:13         ` Eric Abrahamsen
2022-05-05 18:42           ` Erik Colson

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