Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: bwalton@artsci.utoronto.ca (Ben Walton)
Subject: [sup-talk] [PATCH] Add V to view a raw message (headers and body).
Date: Thu,  4 Jun 2009 12:03:10 -0400	[thread overview]
Message-ID: <1244131390-25769-1-git-send-email-bwalton@artsci.utoronto.ca> (raw)

This is an augment of the already existing view header (H) command,
but allows viewing of all mime parts in their raw form, etc.

Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
---
 lib/sup/modes/thread-view-mode.rb |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index 42c6280..8de7ab0 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -27,6 +27,7 @@ EOS
   register_keymap do |k|
     k.add :toggle_detailed_header, "Toggle detailed header", 'h'
     k.add :show_header, "Show full message header", 'H'
+    k.add :show_message, "Show full message (raw form)", 'V'
     k.add :activate_chunk, "Expand/collapse or activate item", :enter
     k.add :expand_all_messages, "Expand/collapse all messages", 'E'
     k.add :edit_draft, "Edit draft", 'e'
@@ -134,6 +135,13 @@ EOS
     end
   end
 
+  def show_message
+    m = @message_lines[curpos] or return
+    BufferManager.spawn_unless_exists("Raw message for #{m.id}") do
+      TextMode.new m.raw_message
+    end
+  end
+
   def toggle_detailed_header
     m = @message_lines[curpos] or return
     @layout[m].state = (@layout[m].state == :detailed ? :open : :detailed)
-- 
1.6.3



             reply	other threads:[~2009-06-04 16:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 16:03 Ben Walton [this message]
2009-06-05  7:15 ` Nicolas Pouillard
2009-06-05 11:30   ` Ben Walton
2009-06-05 15:31     ` 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=1244131390-25769-1-git-send-email-bwalton@artsci.utoronto.ca \
    --to=bwalton@artsci.utoronto.ca \
    /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