Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* What "eval" means in score files?
@ 2010-01-21  4:11 Teemu Likonen
  2010-01-29 17:53 ` Ted Zlatanov
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2010-01-21  4:11 UTC (permalink / raw)
  To: info-gnus-english

Gnus manual says in "(Gnus) Score File Format":

    `eval'
         The value of this entry will be `eval'el.  This element will be
         ignored when handling global score files.

Then what? What should the entry evaluate to? How does Gnus interpret
the result of evaluation? How can I use it with scoring?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What "eval" means in score files?
  2010-01-21  4:11 What "eval" means in score files? Teemu Likonen
@ 2010-01-29 17:53 ` Ted Zlatanov
  2010-01-29 19:11   ` Teemu Likonen
  0 siblings, 1 reply; 3+ messages in thread
From: Ted Zlatanov @ 2010-01-29 17:53 UTC (permalink / raw)
  To: info-gnus-english

On Thu, 21 Jan 2010 06:11:13 +0200 Teemu Likonen <tlikonen@iki.fi> wrote: 

TL> Gnus manual says in "(Gnus) Score File Format":
TL>     `eval'
TL>          The value of this entry will be `eval'el.  This element will be
TL>          ignored when handling global score files.

TL> Then what? What should the entry evaluate to? How does Gnus interpret
TL> the result of evaluation? How can I use it with scoring?

Nothing else in the score file is actually eval-ed, so you're limited to
literal statements.  It's like writing a function without macros.  With
an eval clause in the score file you can generate any of the other keys,
including a string key which maps to a header.  It's like an in-place
macro.

Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What "eval" means in score files?
  2010-01-29 17:53 ` Ted Zlatanov
@ 2010-01-29 19:11   ` Teemu Likonen
  0 siblings, 0 replies; 3+ messages in thread
From: Teemu Likonen @ 2010-01-29 19:11 UTC (permalink / raw)
  To: info-gnus-english

* 2010-01-29 11:53 (-0600), Ted Zlatanov wrote:

> On Thu, 21 Jan 2010 06:11:13 +0200 Teemu Likonen <tlikonen@iki.fi> wrote:
>> Gnus manual says in "(Gnus) Score File Format":
>>     `eval'
>>          The value of this entry will be `eval'el.  This element will be
>>          ignored when handling global score files.
>
>> Then what? What should the entry evaluate to? How does Gnus interpret
>> the result of evaluation? How can I use it with scoring?
>
> Nothing else in the score file is actually eval-ed, so you're limited
> to literal statements. It's like writing a function without macros.
> With an eval clause in the score file you can generate any of the
> other keys, including a string key which maps to a header. It's like
> an in-place macro.

Thanks, that's the kind of feature I'm looking for. So, if I understand
correctly, score file

    ((eval '("from"
             ("Author <...>" 1000 nil e))))

should be effectively equivalent with score file

    (("from"
      ("Author <...>" 1000 nil e)))

But it's not. The score file which uses "eval" has no effect. Could you
(or someone) please give some simple example on how to use it?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-29 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21  4:11 What "eval" means in score files? Teemu Likonen
2010-01-29 17:53 ` Ted Zlatanov
2010-01-29 19:11   ` Teemu Likonen

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).