From: Andrew Cohen <cohen@andy.bu.edu>
To: ding@gnus.org
Subject: Re: nnir summary line formatting
Date: Fri, 03 Dec 2010 08:37:23 -0500 [thread overview]
Message-ID: <87oc93ou3w.fsf@andy.bu.edu> (raw)
In-Reply-To: <b4mfwuffr4v.fsf@jpl.org>
>>>>> "Katsumi" == Katsumi Yamaoka <yamaoka@jpl.org> 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
next prev parent reply other threads:[~2010-12-03 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 15:14 Andrew Cohen
2010-12-02 15:25 ` Tassilo Horn
2010-12-02 15:28 ` Julien Danjou
2010-12-02 20:08 ` Andrew Cohen
2010-12-03 3:54 ` Katsumi Yamaoka
2010-12-03 4:13 ` Andrew Cohen
2010-12-03 13:37 ` Andrew Cohen [this message]
2010-12-03 14:06 ` Katsumi Yamaoka
2010-12-03 14:32 ` Andrew Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oc93ou3w.fsf@andy.bu.edu \
--to=cohen@andy.bu.edu \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).