From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/16386 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.user Subject: Re: Some Gnus Registry questions Date: Mon, 08 Jul 2013 08:15:34 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87a9lxz1qx.fsf@lifelogs.com> References: <87k3m2ihdx.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1373286007 840 80.91.229.3 (8 Jul 2013 12:20:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jul 2013 12:20:07 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Jul 08 14:20:10 2013 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UwAQM-0008QW-Gt for gegu-info-gnus-english@m.gmane.org; Mon, 08 Jul 2013 14:20:10 +0200 Original-Received: from localhost ([::1]:33944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwAQL-0003oa-R1 for gegu-info-gnus-english@m.gmane.org; Mon, 08 Jul 2013 08:20:09 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!quimby.gnus.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 36 Original-NNTP-Posting-Host: pool-72-70-84-160.bstnma.east.verizon.net Original-X-Trace: quimby.gnus.org 1373285734 14989 72.70.84.160 (8 Jul 2013 12:15:34 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Mon, 8 Jul 2013 12:15:34 +0000 (UTC) User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:W9Wsu8igkvU2DTPvYCuraklYs/E= Original-Xref: usenet.stanford.edu gnu.emacs.gnus:87512 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:16386 Archived-At: On Wed, 03 Jul 2013 10:07:09 +0200 Tassilo Horn wrote: TH> Thanks. I've come up with this, and it seems to work: TH> (defun gnus-registry-remove-extra-data (extra) TH> "Remove tracked EXTRA data from the gnus registry. TH> EXTRA is a list of symbols. Valid symbols are those contained in TH> the docs of `gnus-registry-track-extra'. This command is useful TH> if you stop tracking some extra data and now want to purge it TH> from your existing entries." TH> (interactive (list (mapcar 'intern TH> (completing-read-multiple TH> "Extra data: " TH> '("subject" "sender" "recipient"))))) TH> (when extra TH> (let ((db gnus-registry-db)) TH> (registry-reindex db) TH> (loop for k being the hash-keys of (oref db :data) TH> using (hash-value v) TH> do (let ((newv (cl-remove-if #'(lambda (entry) TH> (member (car entry) extra)) TH> v))) TH> (registry-delete db (list k) nil) TH> (gnus-registry-insert db k newv))) TH> (registry-reindex db)))) TH> However, it didn't shrink the size of the registry that much (reduced TH> the size by about one fourth). TH> Anyway, I think it's useful. Should I add it to gnus-registry.el? (I TH> guess I'll have to remove the `cl-remove-if' to stay compatible with TH> older emacsen...) Yes, please, and do what you can for older Emacsen... we can rewrite that code altogether in a Gnus helper function if necessary. Ted