From mboxrd@z Thu Jan 1 00:00:00 1970 From: henri.ducrocq@gmail.com (Henri Ducrocq) Date: Tue, 26 May 2009 16:14:24 +0100 Subject: [sup-talk] [PATCH] New hook: after-save Message-ID: <1243349962-sup-2625@ptoseis> This hook is run when the user presses on '$' to save the state and index. I'm using this to update a file used by my dzen status bar to display the number of unread emails in my inbox. diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 56dcdff..e3e70bb 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -20,6 +20,12 @@ Variables: thread: The message thread being marked as spam. EOS + HookManager.register "after-save", < lambda { Index.num_results_for :labels => [:inbox, :unread] } end def cleanup -- Henri