Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] Attempt at reply-from hook
Date: Fri, 05 Jun 2009 06:37:02 -0700	[thread overview]
Message-ID: <1244208597-sup-4979@entry> (raw)
In-Reply-To: <1244179379-sup-6675@javelin>

Reformatted excerpts from Edward Z. Yang's message of 2009-06-04:
> The message.has_label? "mylabel" returns false, as the body of the if
> statement never gets logged. (My contention is that the message very
> clearly has that label, so wtf).

Try has_label? :mylabel. Sup represents labels as symbols instead of as
strings.

Sorry about that. The hook system is in need of much documentation.

A good environment for playing around with this stuff is to run the console:

  w at drspaceman:~/devel/sup$ sh devel/console.sh 
  [...]
  >> Index.run_query "label:potato"
  => [1000]
  >> m = Index.build_message 1000
  => #<Redwood::Message:0x7f187b394ac8 [...]>
  >> m.labels
  => [:inbox, :unread, :potato]
  >> m.has_label? :potato
  => true
  >> m.has_label? "potato"
  => false

HTH.
-- 
William <wmorgan-sup at masanjin.net>


  reply	other threads:[~2009-06-05 13:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 23:18 Edward Z. Yang
2009-06-02 22:09 ` Ingmar Vanhassel
2009-06-03  2:54   ` Edward Z. Yang
2009-06-03 11:44     ` Ben Walton
2009-06-05  5:24       ` Edward Z. Yang
2009-06-05 13:37         ` William Morgan [this message]
2009-06-06  0:09           ` Edward Z. Yang
2009-06-08 21:34             ` William Morgan
2009-06-08 21:59               ` Edward Z. Yang
     [not found]                 ` <1244502124-sup-7043@cabinet>
2009-06-09  0:12                   ` Edward Z. Yang
     [not found]                     ` <1244518550-sup-6361@cabinet>
2009-06-09  4:06                       ` Edward Z. Yang
2009-06-09 16:52                       ` William Morgan
2009-06-11  3:38                         ` Edward Z. Yang

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=1244208597-sup-4979@entry \
    --to=wmorgan-sup@masanjin.net \
    /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