From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66046 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-registry flags API Date: Fri, 04 Jan 2008 18:43:21 +0100 Message-ID: References: <861w9jeaw4.fsf@lifelogs.com> <86ve6avlnf.fsf@lifelogs.com> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199468711 1776 80.91.229.12 (4 Jan 2008 17:45:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2008 17:45:11 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14539@lists.math.uh.edu Fri Jan 04 18:45:30 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JAqbi-00035k-Gj for ding-account@gmane.org; Fri, 04 Jan 2008 18:45:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JAqam-0007iI-26; Fri, 04 Jan 2008 11:44:24 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JAqak-0007hx-1N for ding@lists.math.uh.edu; Fri, 04 Jan 2008 11:44:22 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JAqai-0004f7-0G for ding@lists.math.uh.edu; Fri, 04 Jan 2008 11:44:21 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JAqah-00079v-00 for ; Fri, 04 Jan 2008 18:44:19 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JAqaf-0008Uk-7d for ding@gnus.org; Fri, 04 Jan 2008 17:44:17 +0000 Original-Received: from hsi-kbw-082-212-056-212.hsi.kabelbw.de ([82.212.56.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jan 2008 17:44:17 +0000 Original-Received: from Reiner.Steib by hsi-kbw-082-212-056-212.hsi.kabelbw.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jan 2008 17:44:17 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 142 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hsi-kbw-082-212-056-212.hsi.kabelbw.de X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66046 Archived-At: On Thu, Jan 03 2008, Ted Zlatanov wrote: > On Thu, 03 Jan 2008 Reiner Steib wrote: > RS> We need documentation in the manual for this as well as for > RS> `gnus-registry.el' in general. The only hits for "registry" in the > RS> manual are in the context of spam*.el. > > Yes. I've been avoiding that work, pretending I was waiting for the > registry to mature :) > > I've been using it for a while now, and the only real problem was with > multilingual characters corrupting the registry, and I think I've found > all the places where that could happen. So it's probably mature enough > to popularize properly. I'll do the docs once the items below have been > finished. I'd prefer if one thing would be finished before starting a new one. ;-) > RS> BTW: I'd like to switch from `nnmail-split-fancy-with-parent' to > RS> `gnus-registry-split-fancy-with-parent'. > > Great, I think a lot of people will like it better. Once this and > tramp-imap.el work, I'll try to get to cross-server mail splitting, > which has always seemed to me a really nice TODO item and I've needed it > many times. I mention cross-server splitting because it relates to > gnus-registry splitting, since the registry will notice articles across > servers. Could you explain, why you don't store the server? Or is this going to change? > RS> Is there a conversion function from `nnmail-message-id-cache-file' > RS> to `gnus-registry-cache-file'? > > Not currently, but the Gnus registry is built every time you visit a > group and see articles, so I doubt this is a big deal. Yes, but mail splitting also should work for message/groups which I haven't seen for a while. > We could write a simple conversion function, does anyone need it? Me. ;-) Is the "((mtime 18302 25797 153059))" sexp optional? Then it would be trivial to write a conversion function. It would be sufficient to convert once, i.e. fetch the entries from `nnmail-message-id-cache-file' and add them to `gnus-registry-hashtb'/`gnus-registry-alist'. BTW, some time ago, I added this comment: ,---- | ;; FIXME: Get rid of duplicated code, cf. `gnus-save-newsrc-file' in | ;; `gnus-start.el'. --rsteib | (defun gnus-registry-cache-save () `---- > RS> I did `M-: (gnus-registry-mark-article nil) RET' without initializing > RS> the registry. AFAICS, this is a no-op -- at least no > RS> ~/.gnus.registry.eld was created. It should probably signal an error. > > On load, we do: [...] > So afterwards, all the operations will work on that hash table > automatically. You need to save the registry (which is automatically > done on load with (add-hook 'gnus-save-newsrc-hook 'gnus-registry-save)) > to get the file. [...] I know that I should do `gnus-registry-initialize' from the commentary in `gnus-registry.el'. But I think operations like `gnus-registry-mark-article' should warn the user about it. I now did `gnus-registry-initialize' and after displaying some articles their MIDs end in ~/.gnus.registry.eld. But `M-: (gnus-registry-mark-article nil) RET' doesn't seem to have any effect: The MID is written, but I don't see anything like `gnus-registry-flag-default' there. Additionally, the command doesn't work if there's no article buffer (e.g. enter the group using `1 RET'). You should use (gnus-summary-article-number) instead of `gnus-current-article'. >>> - if MARK is nil, use gnus-registry-flag-default (you don't want that, >>> it's boring) > > RS> When called interactively, it should prompt for flags with completion. > RS> At least the Mozilla labels ("Important" "Work" "Personal" "To do" > RS> "Later" ) should be > RS> offered by default. The user may add additional flags to this list > RS> and also set arbitrary flags. > > How do you propose I do this, with a customizable list in the registry > namespace or a Gnus-wide customization setting? > > Either way it shouldn't be too hard, though I haven't done it myself. It doesn't matter much. But as long as it is specific to `gnus-registry.el', it might be better to use it's namespace. > Isn't the Important flag confusing? It may be seen as conflicting with > the Gnus tick mark. I'm OK with this list otherwise. It just needs to be documented properly, I think. >>> gnus-registry-article-marks ARTICLE: get list of marks for the article >>> >>> - if ARTICLE is nil, use current article > > RS> Same remark as for `rs-gnus-summary-line-label-alist'. > > Not sure what you mean? [ Copy&paste ... ] When used interactively, the current article should be the default too. Now it insists on "Please enter a number.". Maybe `article' should be optional? >>> Let me know if you find bugs or inconsistencies. I am especially >>> curious how these should integrate with the other Gnus summary >>> functions, and if they should take prefix arguments, etc. > > RS> It should accept Gnus' standard process/prefix convention. > > Is there one prototype function I can copy for this? See e.g. the use of `gnus-summary-work-articles' in `gnus-draft-send-message'. Though instead of (while (setq article (pop articles)) ...) you should probably use `dolist' (which was not available in all Emacsen previously). Some other thoughts/remarks... - As the user probably doesn't want the flags to expire, `gnus-registry-trim' should not trim those MIDs. - How can I avoid that MIDs from nntp groups are stored? Through `gnus-registry-ignored-groups'? It's not clear if it matches the full (prefixed) group name. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/