Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: [PATCH] Two issues with the gnus-registry
Date: Sat, 25 Oct 2014 12:59:38 -0700	[thread overview]
Message-ID: <87mw8j9az9.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87ppdhyynb.fsf@ericabrahamsen.net>

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Hi there,
>>
>> I'm using the gnus-registry in Gnorb to keep track of correspondences
>> between Gnus messages and Org headings, using a key on the registry
>> entries called 'gnorb-ids. This is meant to be a "precious" key, ie
>> entries with this key are not pruned. So far so good:
>>
>> (oref gnus-registry-db :precious) => (gnorb-ids mark)
>>
>> But the entries still do get pruned! I've just had tracked entries start
>> disappearing on me, and realized that they're getting pruned from the
>> registry when I save it. There appear to be two problems here:
>
> [...]
>
>> And I really don't know why the precious entries are getting pruned.
>> In a day or so, when I have more time, I'll test with a dummy registry,
>> with max-entries set to 10 and 'creation-time added to the precious
>> entries -- should make debugging easier.
>
> Okay, I got curious (frustrated) and tried this, and I just don't get
> it. `registry-prune' doesn't seem to work as advertised: first it
> deletes according to `registry-prune-soft-candidates', which preserves
> precious entries, and then it deletes according to
> `registry-prune-hard-candidates', which doesn't.p
>
> The second pass unconditionally caps the registry length at 90% of
> `gnus-registry-max-entries', without consulting the entries' precious
> status at all.
>
> The `prune-needed' local variable also appears unused.

Given the commentary in registry.el, I wonder if the whole pruning
arrangement actually never quite got finished:

;; The user decides which fields are "precious", F2 for example.  At
;; PRUNE TIME (when the :prune-function is called), the registry will
;; trim any entries without the F2 field until the size is :max-soft
;; or less.  No entries with the F2 field will be removed at PRUNE
;; TIME.

It looks like there's supposed to be a :prune-function slot on registry
objects, and presumably the Gnus registry would have a prune function
that worked more like what the comments above outline.

I'd be happy to help work on this, with a little direction...

Eric




  reply	other threads:[~2014-10-25 19:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 19:04 Eric Abrahamsen
2014-10-24 20:56 ` Eric Abrahamsen
2014-10-25 19:59   ` Eric Abrahamsen [this message]
2014-10-27 15:03 ` Ted Zlatanov
2014-10-27 19:15   ` Eric Abrahamsen
2014-10-28 18:04     ` Eric Abrahamsen
2014-11-07 23:56       ` Eric Abrahamsen
2014-11-08  0:01         ` Eric Abrahamsen
2014-11-08  8:39           ` Eric Abrahamsen
2014-11-10 13:54             ` Ted Zlatanov
2014-11-11  2:55               ` Eric Abrahamsen
2014-11-13 12:05               ` Eric Abrahamsen
2014-11-16  1:04                 ` Dan Christensen
2014-11-16  3:24                   ` Eric Abrahamsen
2014-12-18 10:07                 ` Ted Zlatanov
2014-12-18 15:00                   ` Eric Abrahamsen
2014-12-18 15:09                     ` Eric Abrahamsen
2014-12-19  0:44                       ` Katsumi Yamaoka
2014-12-19  2:08                         ` Eric Abrahamsen
2014-12-20  3:09                         ` Ted Zlatanov
2014-12-20 11:22                           ` Katsumi Yamaoka
2014-12-20 13:53                             ` Older Emacsen (was: [PATCH] Two issues with the gnus-registry) Ted Zlatanov
2014-12-19  1:30                       ` [PATCH] Two issues with the gnus-registry Ted Zlatanov
2014-10-28 20:10     ` Ted Zlatanov

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=87mw8j9az9.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /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).