Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Add 'a' and 'd' keybindings to thread-view-mode to archive/delete current thread
@ 2009-08-26 22:40 Carl Worth
  2009-09-03 18:06 ` William Morgan
  0 siblings, 1 reply; 10+ messages in thread
From: Carl Worth @ 2009-08-26 22:40 UTC (permalink / raw)


These behave identically to the existing ",a" and ",d" commands, (that
is they archive or delete the current thread and then view the next).
---

I appreciate that within thread-view-mode, sup already supports
explicitly selecting one of three different actions for what do after
the user is done with a thread. And the choice is determined by one of
three different prefix characters. For example:

    . -> return to previous buffer (likely something like
         inbox-mode/search-result-mode)
    , -> advance to next thread (into thread-view-mode)
    ] -> advance to previous thread (into thread-view-mode)

I'm lazy enough to want a single-character command for efficient
processing of mail in thread-view-mode, (just like I already have
while in inbox-mode and search-results-mode). And for two of the
different actions, (archive and delete), the obvious/consistent
keybinding is available. So this patch assigns those, ('a' as a
shortcut for ',a' and 'd' as a shortcut for ',d').

If I seem too lazy here, and it doesn't seem sane to add these
keybindingd by default, just let me know. In that case I'll consign
myself to just using a hook to setup these keybindings for myself
personally.

The perhaps-not-as-obvious piece is what the exit action should be for
these shortcut commands. For my own use, I've found it best to advance
to the next thread. (This supports a workflow where there's one pass
through the inbox to archive as much as possible without reading, and
then another pass through thread-view-mode for everything that's
left.)

One thing this patch doesn't provide is shortcuts for the other three
exit actions, (',s' for mark-as-spam-then-next, ',N' for
mark-as-unread-then-next, and ',n' for simply advancing to the next
thread without changing the current thread).

Of those, the only one I really care about personally is ',n'. It's
obviously not a simple matter of just making 'n' a shortcut for ',n'
since the 'n' keybinding is already used. But actually, I think I
would like the 'n' keybinding to advance to the next thread once I'm
viewing the last open message in the current thread. This would make
for very efficient sessions of just reading mail, where I'd only need
to keep hitting 'n', (and I could hit 'a' whenever bored with any
particular thread). So perhaps I'll look into coding that up next.

 lib/sup/modes/thread-view-mode.rb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index 678b841..0706757 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -64,6 +64,9 @@ EOS
     k.add :unsubscribe_from_list, "Subscribe to/unsubscribe from mailing list", ")"
     k.add :pipe_message, "Pipe message or attachment to a shell command", '|'
 
+    k.add :archive_and_next, "Archive this thread, kill buffer, and view next", 'a'
+    k.add :delete_and_next, "Delete this thread, kill buffer, and view next", 'd'
+
     k.add_multi "(a)rchive/(d)elete/mark as (s)pam/mark as u(N)read:", '.' do |kk|
       kk.add :archive_and_kill, "Archive this thread and kill buffer", 'a'
       kk.add :delete_and_kill, "Delete this thread and kill buffer", 'd'
-- 
1.6.3.3
-------------- 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/20090826/ac261bb3/attachment.bin>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-09 14:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26 22:40 [sup-talk] [PATCH] Add 'a' and 'd' keybindings to thread-view-mode to archive/delete current thread Carl Worth
2009-09-03 18:06 ` William Morgan
2009-09-03 18:37   ` Mark Alexander
2009-09-03 18:58     ` Nicholas Bergson-Shilcock
2009-09-06 19:43   ` Nicolas Pouillard
2009-09-08 20:26     ` Carl Worth
2009-09-08 20:33       ` Nicolas Pouillard
2009-09-08 15:17   ` Wirt Wolff
2009-09-08 20:08     ` William Morgan
2009-09-09 14:37       ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox