Eric Abrahamsen writes: > Eric Abrahamsen writes: > >> Ted Zlatanov writes: > > [...] > >>> The registry has ERT tests, which I thought covered this case. Can you >>> look at `tests/gnustest-registry.el'? As a first step, can you try >>> making tests to demonstrate the problems? >> >> Will do. > > Okay, turns out there were tests, but the bit that tests pruning was > commented out :) > > This is the first in a (gradual) series of patches. It does very little > except: > > 1. Adjust `registry-prune' to do what the docstring says: return the > total number of entries pruned > > 2. Uncomment the pruning test and adjust it so it correctly catches the > number of pruned entries. > > Test should fail. Over the next couple of days I'll add another test to > check that entries are sorted correctly before pruning, and then take a > stab at fixing the pruning itself. Okay I realized it didn't make too much sense to patch gnus just to make it fail, so here's a complete patch, with passing tests, that preserves precious entries when pruning. I haven't done the sorting yet, that will be a separate patch. My main realization when working on this is that the distinction between max-soft and max-hard is confusing, and possibly unnecessary. Do we really need both? If, as I suspect, most users set one but not the other, then there's no point in having both. Is anyone really setting two different values for `gnus-registry-max-entries' and `gnus-registry-max-pruned-entries'? And why? Eric