From: Hamish D <dmishd@gmail.com>
To: Shadowfirebird <shadowfirebird@gmail.com>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] Hints on debugging hooks
Date: Tue, 19 Oct 2010 19:18:29 +0100 [thread overview]
Message-ID: <AANLkTim+3+rbZQ79Wct4iwio49Te4r6cqL0udZni5m-N@mail.gmail.com> (raw)
In-Reply-To: <1287479408-sup-4846@blake>
> Can someone give me some hints on debugging hooks? For example, is there an easy way to get just one message object in the console, so I can play with it?
For hooks, I tried using debug. So in the before-add-message hook you
could have:
debug ("message subject is #{message.subj} and is from #{message.from.email}")
Then launch sup with debug on:
$ SUP_LOG_LEVEL=debug sup
And you will get extra logging, including your hook debug message, in
the log buffer (press ; to see the buffer list).
One thing to watch out for in the message hooks is that the regex is
case sensitive by default. To change that, just put an i at the end,
eg
if message.subj =~ /\[sup-talk\]/i
message.add_label "sup"
end
Good luck
Hamish
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2010-10-19 18:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 9:18 Shadowfirebird
2010-10-19 17:31 ` Michael Stapelberg
2010-10-19 18:18 ` Hamish D [this message]
2010-10-20 21:00 ` Shadowfirebird
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=AANLkTim+3+rbZQ79Wct4iwio49Te4r6cqL0udZni5m-N@mail.gmail.com \
--to=dmishd@gmail.com \
--cc=shadowfirebird@gmail.com \
--cc=sup-talk@rubyforge.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