Gnus development mailing list
 help / color / mirror / Atom feed
From: John Griffith <griffith@sfs.nphil.uni-tuebingen.de>
Cc: griffith@filippo.sfs.nphil.uni-tuebingen.de
Subject: Re: articles which won't cache
Date: Thu, 29 Feb 1996 12:40:04 +0100	[thread overview]
Message-ID: <199602291140.MAA17992@filippo.sfs.nphil.uni-tuebingen.de> (raw)
In-Reply-To: Your message of "27 Feb 1996 11:31:43 +0100." <w8sag252h68.fsf@eistla.ifi.uio.no>


Lars Magne Ingebrigtsen writes:
>Roderick Schertler <roderick@gate.net> writes:
>
>> I'm afraid this behavior went away after about a half dozen tries while
>> I was trying to to track it down (this might or might not have
>> correlated with exiting emacs rather than just exiting and restarting
>> Gnus) so I'm afraid I don't have any hard information to offer, I mainly
>> wanted to send out a feeler to see if anybody else had seen something
>> similar.
>
>I have had similar reports, but I've been unsuccessful in trying to
>duplicate the bug.  It would be most helpful if you could find a way
>to reliably trigger the bug.

I seem to have no problem duplicating this bug.  It think as well that
I have tracked it down and have a possible fix, though I haven't tried
to fix the code.

Sorry that this is a bit long.  The possible fix is at the end.

Here's my setup using September 0.46 and XEmacs 19.13.

.emacs
------------------------------------------------------------
(setq load-path (cons (expand-file-name "~/emacs/sgnus-0.46/lisp") load-path))
------------------------------------------------------------

.gnus
------------------------------------------------------------
(setq gnus-nntp-server	"newsserv.zdv.uni-tuebingen.de" )
(setq gnus-use-cache t)
(setq gnus-cache-directory "~/mhbox/News/cache")
------------------------------------------------------------

Initially the directory ~/mhbox/News/cache/news.announce.newusers
does not exist.

Group buffer:
------------------------------------------------------------
       6: news.announce.newusers
   77380: news.newusers.questions
    1071: news.answers
------------------------------------------------------------

" " on n.a.n to enter group and select the first article.

Summary buffer:
------------------------------------------------------------
R  [1061: Chris Lewis         ] How to become a Usenet site
   [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
   [  82: Mark Moraes         ] Welcome to Usenet!
   [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------

"?" to mark the first article as dormant.

Summary buffer:
------------------------------------------------------------
?* [1061: Chris Lewis         ] How to become a Usenet site
   [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
   [  82: Mark Moraes         ] Welcome to Usenet!
   [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------

The directory ~/mhbox/News/cache/news.announce.newusers is created and
the article is now in the cache.

"c y" to catch up and leave the group.

*** Here's the first bug ***

The article is no longer in the cache.  (In fact the directory is also
removed, but this seems to only happen if it's empty.)

Group buffer:
------------------------------------------------------------
       0: news.announce.newusers
   77380: news.newusers.questions
    1071: news.answers
------------------------------------------------------------

"C-u =" on n.a.n to reread group.

Summary buffer:
------------------------------------------------------------
?  [1061: Chris Lewis         ] How to become a Usenet site
O  [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
O  [  82: Mark Moraes         ] Welcome to Usenet!
O  [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------

Article still not in cache.  Note there is no "*" mark.

" " to read first article.

Summary buffer:
------------------------------------------------------------
?  [1061: Chris Lewis         ] How to become a Usenet site
O  [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
O  [  82: Mark Moraes         ] Welcome to Usenet!
O  [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------

Now the article is back in the cache and the "*" mark has returned.

"c y" again to leave and the article remains in the cache.

Weird, huh?

============================================================
Now some related bugs (perhaps):

Enter n.a.n again with "C-u ="

Summary buffer:
------------------------------------------------------------
?* [1061: Chris Lewis         ] How to become a Usenet site
O  [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
O  [  82: Mark Moraes         ] Welcome to Usenet!
O  [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------

[Note that caching and dormant stuff is fine now.]

I decide that I don't want the first article marked as dormant any
more, so I do "M c" on the first article.

Summary buffer:
------------------------------------------------------------
 * [1061: Chris Lewis         ] How to become a Usenet site
O  [ 829: David Alex Lamb     ] FAQ: How to find people's E-mail addresses
O  [  82: Mark Moraes         ] Welcome to Usenet!
O  [ 492: Aliza R. Panitz     ] How to find the right place to post (FAQ)
------------------------------------------------------------
"M c" removes the "?" mark but not the "*", nor does it remove the
article from the cache. (even after "c y" to leave the group).

*** Is this the correct behavior? ***

Perhaps it is the correct behavior since because GNUS doesn't seem to
distinguish between articles that I cached because they were dormant
and those that I explicitly cache.  (Maybe it should make this
distinction?)

Anyway, suppose I decide that I want to uncache the article too.
I type "M-*" on the first article.

*** Second bug ****

Beep. Error in minibuffer: "Wrong type argument: stringp, nil"

The article *is* removed from the cache, but the "*" is not removed
from the summary buffer.  The cache directory is not removed however
since there is now a .overview file in it.  (perhaps a buglet?)

This second bug smells a bit like an XEmacs specific one.

============================================================

I can duplicate these bugs over and over again.

Here's my attempt at debugging the first bug and a possible solution.

A trace:

gnus-summary-catchup-and-exit
  calls: gnus-summary-exit
    calls: gnus-cache-possibly-remove-articles
       calls: gnus-cache-possibly-remove-articles-1
           calls: gnus-cache-possibly-remove-article
              calls: gnus-cache-member-of-class

This last call looks like:

    `(gnus-cache-member-of-class (read) nil (1090) nil)'

which returns `(read)' and consequently causes
gnus-cache-possibly-remove-article to delete the file.

Here's the definition of gnus-cache-member-of-class:

(defun gnus-cache-member-of-class (class ticked dormant unread)
  (or (and ticked (memq 'ticked class))
      (and dormant (memq 'dormant class))
      (and unread (memq 'unread class))
      (and (not unread) (memq 'read class))))

The problem seems to be that all read articles are removed from the
cache even if they are marked as dormant and gnus-use-cache is t.

I guess one solution is that gnus-cache-possibly-remove-article should
check if the article is dormant and gnus-use-cache is t, if so then do
not delete the file.  But not (yet) having intimate knowledge of the
code I'm not sure if this test should go here or somewhere earlier.

Have a nice day.


      parent reply	other threads:[~1996-02-29 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-27  2:08 Roderick Schertler
1996-02-27 10:31 ` Lars Magne Ingebrigtsen
1996-02-28  0:13   ` Roderick Schertler
1996-02-29 11:40   ` John Griffith [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199602291140.MAA17992@filippo.sfs.nphil.uni-tuebingen.de \
    --to=griffith@sfs.nphil.uni-tuebingen.de \
    --cc=griffith@filippo.sfs.nphil.uni-tuebingen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).