unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group
@ 2021-02-15 13:45 Teemu Likonen
  2021-02-16 12:23 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2021-02-15 13:45 UTC (permalink / raw)
  To: 46533

[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]

Gnus mail and news client has "agent" feature for caching articles
locally. The local cache can be expired by command "M-x
gnus-agent-expire".

However, the expiry does not always expire all cached articles. It seems
that the expiry mechanism leaves one article file if there are not any
newer articles in the same group.

For example, currently in my system all article files older than
2021-02-08 have been expired. Yet one older file remains:

    $ cd "$HOME/News/agent/nntp"
    $ find . -type f -regex '.*/[0-9]+$' -print0 | \
        xargs -0r ls -gGltu | tail -n3

    -rw-r--r-- 1   1104 2021-02-08 08:10:18 ./september/alt/os/linux/69718
    -rw-r--r-- 1   5350 2021-02-08 08:10:04 ./gmane/gmane/emacs/gnus/user/19400
    -rw-r--r-- 1   5394 2021-02-05 19:41:11 ./gmane/gmane/ietf/openpgp/9871

There is one file with access time ("ls -ltu") 2021-02-05. It should
have been removed already but it is the last article in its group so it
remains. I think I have seen such articles expire after new article
arrives in the same group.

There is not any easy recipe for reproducing the behaviour. You have to
set up Gnus agent and make Gnus cache some articles. Here's a start:

    ;; Expire everything before today.
    (setq gnus-agent-expire-days 0)

    ;; Fetch all selected articles.
    (add-hook 'gnus-select-article-hook 'gnus-agent-fetch-selected-article)

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

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

* bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group
  2021-02-15 13:45 bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group Teemu Likonen
@ 2021-02-16 12:23 ` Lars Ingebrigtsen
  2021-02-16 22:07   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-16 12:23 UTC (permalink / raw)
  To: Teemu Likonen; +Cc: 46533

Teemu Likonen <tlikonen@iki.fi> writes:

> There is one file with access time ("ls -ltu") 2021-02-05. It should
> have been removed already but it is the last article in its group so it
> remains.

I haven't tried to debug this, but this does sound familiar.  I seem to
vaguely remember that the Agent has to been the highest-numbered article
for accounting reasons?  So expiry doesn't touch the newest article.

I may be totally misremembering, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group
  2021-02-16 12:23 ` Lars Ingebrigtsen
@ 2021-02-16 22:07   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-16 22:07 UTC (permalink / raw)
  To: Teemu Likonen; +Cc: 46533

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I haven't tried to debug this, but this does sound familiar.  I seem to
> vaguely remember that the Agent has to been the highest-numbered article
> for accounting reasons?  So expiry doesn't touch the newest article.

Yup, I remembered correctly.  I've now documented this quirk in the Gnus
manual.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-02-16 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 13:45 bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group Teemu Likonen
2021-02-16 12:23 ` Lars Ingebrigtsen
2021-02-16 22:07   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).