I prefer to reply to a mailing list, then all participants:

  $ cat .sup/hooks/reply-to.rb
  ([:list, :all] & types)[0]
---
I've been happily using this locally, and forgot to send it to the list. :P

 lib/sup/modes/reply-mode.rb |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index e7b2929..ad50fed 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -19,6 +19,14 @@ Return value:
   A string containing the text of the quote line (can be multi-line)
 EOS
 
+  HookManager.register "reply-to", <<EOS
+Set the Reply To field.
+Variables:
+  types: the valid types to choose from
+Return value:
+  The reply type you desire, or nil to let sup set it.
+EOS
+
   def initialize message
     @m = message
 
@@ -92,8 +100,13 @@ EOS
     types = REPLY_TYPES.select { |t| @headers.member?(t) }
     @type_selector = HorizontalSelector.new "Reply to:", types, types.map { 
|x| TYPE_DESCRIPTIONS[x] }
 
+    hook_reply = HookManager.run "reply-to", :types => types
+    Redwood::log hook_reply.to_s
+
     @type_selector.set_to(
-      if @m.is_list_message?
+      if types.include? hook_reply
+        hook_reply
+      elsif @m.is_list_message?
         :list
       elsif @headers.member? :sender
         :sender
-- 
1.5.5.1

_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to