Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: grant@antiflux.org (Grant Hollingworth)
Subject: [sup-talk] [PATCH] renamed "quoteline" hook to "attribution"
Date: Thu, 17 Jan 2008 12:49:21 -0500	[thread overview]
Message-ID: <1200591847-sup-3296@spooky.local> (raw)
In-Reply-To: <1200517786-sup-7789@south>

---
 lib/sup/modes/reply-mode.rb |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index 2d05f15..3b8c920 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -10,10 +10,11 @@ class ReplyMode < EditMessageMode
     :user => "Customized"
   }
 
-  HookManager.register "quoteline", <<EOS
-Generates a quote line "On 1/4/2007, Joe Bloggs wrote:".
+  HookManager.register "attribution", <<EOS
+Generates an attribution ("Excerpts from Joe Bloggs's message of Fri Jan 11 09:54:32 -0500 2008:").
 Variables:
-      message: A message object representing the message being replied to
+  message: a message object representing the message being replied to
+    (useful values include message.from.name and message.date)
 Return value:
   A string containing the text of the quote line (can be multi-line)
 EOS
@@ -123,13 +124,13 @@ protected
   end
 
   def reply_body_lines m
-    quoteline = HookManager.run("quoteline", :message => m) || default_quoteline(m)
-    lines = quoteline.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" }
+    attribution = HookManager.run("attribution", :message => m) || default_attribution(m)
+    lines = attribution.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" }
     lines.pop while lines.last =~ /^\s*$/
     lines
   end
 
-  def default_quoteline m
+  def default_attribution m
     "Excerpts from #{@m.from.name}'s message of #{@m.date}:"
   end
 
-- 
1.5.3.7


  reply	other threads:[~2008-01-17 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14 12:24 [sup-talk] [PATCH] Added quoteline hook. This allows you to specify how the text above the quoted email should look (Normally 'Excerpts froms...') Marcus Williams
2008-01-15  5:20 ` William Morgan
2008-01-15  9:18   ` Marcus Williams
2008-01-15  9:40     ` [sup-talk] [PATCH] Added quoteline hook for reply mode Marcus Williams
2008-01-16  1:31       ` William Morgan
2008-01-16 16:32       ` Grant Hollingworth
2008-01-16 16:39         ` Marcus Williams
2008-01-16 21:09           ` William Morgan
2008-01-17 17:49             ` Grant Hollingworth [this message]
2008-01-22  2:49               ` [sup-talk] [PATCH] renamed "quoteline" hook to "attribution" William Morgan

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=1200591847-sup-3296@spooky.local \
    --to=grant@antiflux.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