From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74637 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir summary line formatting Date: Fri, 03 Dec 2010 08:37:23 -0500 Message-ID: <87oc93ou3w.fsf@andy.bu.edu> References: <87ipzc1a1q.fsf@andy.bu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291383509 28927 80.91.229.12 (3 Dec 2010 13:38:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2010 13:38:29 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22993@lists.math.uh.edu Fri Dec 03 14:38:25 2010 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.69) (envelope-from ) id 1POVq6-000295-90 for ding-account@gmane.org; Fri, 03 Dec 2010 14:38: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 1POVpV-0000aQ-5j; Fri, 03 Dec 2010 07:37:41 -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 1POVpS-0000aC-Ef for ding@lists.math.uh.edu; Fri, 03 Dec 2010 07:37:38 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1POVpQ-0000Wg-Ry for ding@lists.math.uh.edu; Fri, 03 Dec 2010 07:37:37 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1POVpQ-0003yW-00 for ; Fri, 03 Dec 2010 14:37:36 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1POVpP-0001my-Qx for ding@gnus.org; Fri, 03 Dec 2010 14:37:35 +0100 Original-Received: from rain.gmane.org ([80.91.229.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Dec 2010 14:37:35 +0100 Original-Received: from cohen by rain.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Dec 2010 14:37:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:cMxDhUxnhC4kR49XrqIfR/+ET58= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74637 Archived-At: >>>>> "Katsumi" == Katsumi Yamaoka writes: Katsumi> Currently nnir- macros used in Katsumi> `gnus-summary-line-format-alist' will never be expanded. Katsumi> For instance: Katsumi> (assq ?Z gnus-summary-line-format-alist) => (90 (or Katsumi> (nnir-article-rsv (aref gnus-tmp-header 0)) 0) 100) Katsumi> But it seems to have to be: => (90 (or (elt (if (> (aref Katsumi> gnus-tmp-header 0) 0) (progn (elt nnir-artlist (1- (aref Katsumi> gnus-tmp-header 0))))) 2) 0) 100) Katsumi> To make it do that, those macros have to be loaded before Katsumi> gnus-sum, however nnir requires gnus-sum in it. Hi Katsumi: I'm just learning about this stuff so I wanted to ask if this is the right way to handle it: I've added autoloads to gnus-sum: (autoload 'nnir-article-rsv "nnir" nil nil 'macro) (autoload 'nnir-article-group "nnir" nil nil 'macro) and I've rearranged the order of things in nnir.el so the macro definitions come before the (require 'gnus-sum). After doing this (and byte compiling and starting fresh) I have (assq ?Z gnus-summary-line-format-alist) (90 (or (elt (if ... ...) 2) 0) 100) which looks good (the macro is fully expanded). And no warnings during byte-compilation. Does this all sound right? If so, I'll push the change. Best, Andy