Subject: [sup-talk] [PATCH] Add V to view a raw message (headers and body).

From: [email-masked] (Ben Walton)
Date: Thu, 4 Jun 2009 12:03:10 -0400

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

---

From: [email-masked] (Nicolas Pouillard)
Date: Fri, 05 Jun 2009 09:15:02 +0200

> but allows viewing of all mime parts in their raw form, etc.

I usually use '|' followed by "cat" or "less" for this purpose, but maybe a
dedicated key-binding is better.

-- 
Nicolas Pouillard
http://nicolaspouillard.fr

---

From: [email-masked] (Ben Walton)
Date: Fri, 05 Jun 2009 07:30:51 -0400

> dedicated key-binding is better.

Yah, I was aiming for less typing...it's something I do often enough.

-Ben

-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090605/0f741833/attachment.bin>

---

From: [email-masked] (William Morgan)
Date: Fri, 05 Jun 2009 08:31:07 -0700

> Yah, I was aiming for less typing...it's something I do often enough.

Good enough for me. Applied directly to master. Thanks!
-- 
William <wmorgan-sup at masanjin.net>