From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66433 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-registry flags API Date: Wed, 05 Mar 2008 13:00:54 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <863ar5807t.fsf@lifelogs.com> References: <861w9jeaw4.fsf@lifelogs.com> <86ve6avlnf.fsf@lifelogs.com> <86ir1u3g8b.fsf@lifelogs.com> <864pddzbdu.fsf@lifelogs.com> <86d4raats5.fsf@lifelogs.com> <86skzdnmh2.fsf@lifelogs.com> <86bq5u9kkd.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 1204789134 872 80.91.229.12 (6 Mar 2008 07:38:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 07:38:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14923@lists.math.uh.edu Thu Mar 06 08:39:21 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 1JXAhC-0000l3-C9 for ding-account@gmane.org; Thu, 06 Mar 2008 08:39:18 +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 1JXAfZ-0006SB-Uu; Thu, 06 Mar 2008 01:37:38 -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 1JWypt-0002yc-Ki for ding@lists.math.uh.edu; Wed, 05 Mar 2008 12:59:29 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JWypk-0000nc-GA for ding@lists.math.uh.edu; Wed, 05 Mar 2008 12:59:29 -0600 Original-Received: from mail.blockstar.com ([170.224.69.95]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JWypq-0002rx-00 for ; Wed, 05 Mar 2008 19:59:26 +0100 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 70DD93E8085 for ; Wed, 5 Mar 2008 11:00:58 -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:080305:ding@gnus.org::9NF2KwKNf4JhhSnM:00009Dda In-Reply-To: <86bq5u9kkd.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 04 Mar 2008 16:43:46 -0600") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66433 Archived-At: On Tue, 04 Mar 2008 16:43:46 -0600 Ted Zlatanov wrote: TZ> I couldn't figure out the text properties, or how to update the summary TZ> line as soon as a flag is set. For now I've comitted a function TZ> gnus-registry-user-format-function-M that shows the flags (unsorted, in TZ> the order they were set). But the user has to exit the group and TZ> re-enter it to see the new flags. I'll take a look again but if someone TZ> knows how to do it, please let me know to save me all the work. I still haven't done text properties, but the rest is working now. See gnus-registry-user-format-function-M and gnus-registry-install-shortcuts for the details. TZ> Also the string-building construct in that function ... TZ> (setq out (format "%s%s" TZ> out TZ> (if c TZ> (char-to-string c) TZ> ""))))) ... TZ> is ugly. How would I do the same with mapcar? I couldn't find a nice TZ> way to eliminate nil entries (when the flag has no :char property) from TZ> the resulting list I would pass to concat; concat would get a list like TZ> (?l ?i nil) and fail. I figured it out, you just do (concat list1 nil list2) and it does the right thing. I didn't read the docs carefully. TZ> The functions are dynamically generated from the gnus-registry-marks TZ> list, but I couldn't figure out how to generate the gnus-define-keys TZ> call (as I mention in the comments). Also it seems that each call will TZ> reset previously defined shortcuts. If anyone knows, please tell me TZ> using function-name and shortcut. I figured this out, and gnus-registry-install-shortcuts will DTRT for keyboard shortcuts. The menus are hard-coded in gnus-sum.el and I didn't think it was useful to generate them dynamically. TZ> Where should the menu shortcuts live? I put them under Gnus->Registry Marks to be near the other mark operations. Remaining: - call (gnus-registry-install-p) in Gnus startup - make gnus-registry-install-p call Customize if appropriate, I'm not sure - text properties and images for each flag It's finally coming together, so please test the functionality and let me know what you think. Thanks Ted