From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66037 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-registry flags API Date: Thu, 03 Jan 2008 11:55:48 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86ve6avlnf.fsf@lifelogs.com> References: <861w9jeaw4.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199382946 4225 80.91.229.12 (3 Jan 2008 17:55:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2008 17:55:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14530@lists.math.uh.edu Thu Jan 03 18:56:06 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 1JAUIU-0000VJ-3w for ding-account@gmane.org; Thu, 03 Jan 2008 18:56:02 +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 1JAUHs-0001P4-U1; Thu, 03 Jan 2008 11:55:24 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JAUHr-0001Ol-2Y for ding@lists.math.uh.edu; Thu, 03 Jan 2008 11:55:23 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JAUHp-0006pR-66 for ding@lists.math.uh.edu; Thu, 03 Jan 2008 11:55:22 -0600 Original-Received: from blockstar.com ([170.224.69.95] helo=mail.blockstar.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JAUHo-0002qE-00 for ; Thu, 03 Jan 2008 18:55:21 +0100 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 7CF063F8986 for ; Thu, 3 Jan 2008 10:25:26 -0800 (PST) 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" X-Hashcash: 1:20:080103:ding@gnus.org::eChU6C5Hm53eXdW9:00001bHu In-Reply-To: (Reiner Steib's message of "Thu, 03 Jan 2008 18:10:51 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66037 Archived-At: On Thu, 03 Jan 2008 18:10:51 +0100 Reiner Steib wrote: RS> On Wed, Dec 19 2007, Ted Zlatanov wrote: >> On Tue, 25 Sep 2007 11:26:08 -0500 Ted Zlatanov wrote: >> TZ> The frontend functionality I would like: >> TZ> - set a flag for an article (this should be a simple function a user can TZ> call from a group or message buffer, which grabs the message ID and uses TZ> the gnus-registry API afterwards) >> TZ> - indicate the article flags somehow (fringe or status line maybe?) >> TZ> - add summary line formatting support for arbitrary flags >> TZ> Any suggestions or contributions (especially the three items above) are TZ> welcome. Please review and criticize the code if you can, I haven't TZ> done Emacs Lisp in a bit :) >> >> I added the essential functions (first on the list) in CVS, now we need >> a status line / summary line integration for these. 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. 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. 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. We could write a simple conversion function, does anyone need it? >> Note that the MARK here is really any Lisp symbol, so >> 'hello-there-flag and 'goodbye-here-but-I-like-verbosity-flag are >> OK. Go wild. >> >> gnus-registry-mark-article ARTICLE &optional MARK REMOVE >> >> - if ARTICLE is nil, use current article RS> When used interactively, the current article should be the default RS> too. Now it insists on "Please enter a number.". Maybe `article' RS> should be optional? Yes, I think that's my error, and it should not be doing that interactive query. I'll add the necessary code for this plus the process convention plus flag completion (see below). 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: (defvar gnus-registry-hashtb (make-hash-table :size 256 :test 'equal) "*The article registry by Message ID.") 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. You also need to read that file on startup; the default setup is: (when gnus-registry-install (gnus-registry-install-hooks) (gnus-registry-read)) >> - 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. Isn't the Important flag confusing? It may be seen as conflicting with the Gnus tick mark. I'm OK with this list otherwise. >> - if REMOVE is t, remove MARK from the flags >> >> 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? >> 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? Thanks Ted