From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH] reply all keybindings
Date: Sun, 23 Aug 2009 11:49:02 -0700 [thread overview]
Message-ID: <1251053342-11859-1-git-send-email-rlane@club.cc.cmu.edu> (raw)
---
lib/sup/modes/reply-mode.rb | 6 ++++--
lib/sup/modes/thread-index-mode.rb | 7 +++++--
lib/sup/modes/thread-view-mode.rb | 7 +++++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index 700dfc1..3d39a8a 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -40,7 +40,7 @@ Return value:
The reply mode you desire, or nil to use the default behavior.
EOS
- def initialize message
+ def initialize message, type_arg=nil
@m = message
## it's important to put this early because it forces a read of
@@ -138,7 +138,9 @@ EOS
hook_reply = HookManager.run "reply-to", :modes => types
@type_selector.set_to(
- if types.include? hook_reply
+ if types.include? type_arg
+ type_arg
+ elsif types.include? hook_reply
hook_reply
elsif @m.is_list_message?
:list
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index fb6b2ce..d1b7fdb 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -40,6 +40,7 @@ EOS
k.add :save, "Save changes now", '$'
k.add :jump_to_next_new, "Jump to next new thread", :tab
k.add :reply, "Reply to latest message in a thread", 'r'
+ k.add :reply_all, "Reply to all participants of the latest message in a thread", 'G'
k.add :forward, "Forward latest message in a thread", 'f'
k.add :toggle_tagged, "Tag/untag selected thread", 't'
k.add :toggle_tagged_all, "Tag/untag all threads", 'T'
@@ -584,15 +585,17 @@ EOS
end
end
- def reply
+ def reply type_arg=nil
t = cursor_thread or return
m = t.latest_message
return if m.nil? # probably won't happen
m.load_from_source!
- mode = ReplyMode.new m
+ mode = ReplyMode.new m, type_arg
BufferManager.spawn "Reply to #{m.subj}", mode
end
+ def reply_all; reply :all; end
+
def forward
t = cursor_thread or return
m = t.latest_message
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index bac4792..98145cc 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -53,6 +53,7 @@ EOS
k.add :toggle_new, "Toggle unread/read status of message", 'N'
# k.add :collapse_non_new_messages, "Collapse all but unread messages", 'N'
k.add :reply, "Reply to a message", 'r'
+ k.add :reply_all, "Reply to all participants of this message", 'G'
k.add :forward, "Forward a message or attachment", 'f'
k.add :bounce, "Bounce message to other recipient(s)", '!'
k.add :alias, "Edit alias/nickname for a person", 'i'
@@ -161,12 +162,14 @@ EOS
update
end
- def reply
+ def reply type_arg=nil
m = @message_lines[curpos] or return
- mode = ReplyMode.new m
+ mode = ReplyMode.new m, type_arg
BufferManager.spawn "Reply to #{m.subj}", mode
end
+ def reply_all; reply :all; end
+
def subscribe_to_list
m = @message_lines[curpos] or return
if m.list_subscribe && m.list_subscribe =~ /<mailto:(.*?)\?(subject=(.*?))>/
--
1.6.4
next reply other threads:[~2009-08-23 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-23 18:49 Rich Lane [this message]
2009-09-01 2:51 ` 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=1251053342-11859-1-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
/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