[PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode

2010-11-11 Thread Carl Worth
On Sat, 18 Sep 2010 15:48:22 -0400, Jameson Rollins  wrote:
> This add a "stash-map" for search-mode, just like in show-mode, and
> adds one function, bound to "i" to stash the thread-id of the current
> selected thread.
> 
> Couldn't think of the correct way to stash other thread info, so I
> didn't add any other stash functions for now.

Excellent. I've wanted this functionality for a while now. Hopefully I
can keep up better with patches on the list in the future so I don't
have to delay my gratification so much.

This is pushed now.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode

2010-11-11 Thread Carl Worth
On Sat, 18 Sep 2010 15:48:22 -0400, Jameson Rollins 
jroll...@finestructure.net wrote:
 This add a stash-map for search-mode, just like in show-mode, and
 adds one function, bound to i to stash the thread-id of the current
 selected thread.
 
 Couldn't think of the correct way to stash other thread info, so I
 didn't add any other stash functions for now.

Excellent. I've wanted this functionality for a while now. Hopefully I
can keep up better with patches on the list in the future so I don't
have to delay my gratification so much.

This is pushed now.

-Carl

-- 
carl.d.wo...@intel.com


pgpqRYYXLy2js.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode

2010-09-18 Thread Jameson Rollins
This add a stash-map for search-mode, just like in show-mode, and
adds one function, bound to i to stash the thread-id of the current
selected thread.

Couldn't think of the correct way to stash other thread info, so I
didn't add any other stash functions for now.
---
 emacs/notmuch.el |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index fe1041f..c8486ba 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -207,6 +207,7 @@ For a mouse binding, return nil.
 (define-key map m 'notmuch-mua-mail)
 (define-key map s 'notmuch-search)
 (define-key map o 'notmuch-search-toggle-order)
+(define-key map c 'notmuch-search-stash-map)
 (define-key map = 'notmuch-search-refresh-view)
 (define-key map G 'notmuch-search-poll-and-refresh-view)
 (define-key map t 'notmuch-search-filter-by-tag)
@@ -221,6 +222,18 @@ For a mouse binding, return nil.
   Keymap for \notmuch search\ buffers.)
 (fset 'notmuch-search-mode-map notmuch-search-mode-map)
 
+(defvar notmuch-search-stash-map
+  (let ((map (make-sparse-keymap)))
+(define-key map i 'notmuch-search-stash-thread-id)
+map)
+  Submap for stash commands)
+(fset 'notmuch-search-stash-map notmuch-search-stash-map)
+
+(defun notmuch-search-stash-thread-id ()
+  Copy thread ID of current thread to kill-ring.
+  (interactive)
+  (notmuch-common-do-stash (notmuch-search-find-thread-id)))
+
 (defvar notmuch-search-query-string)
 (defvar notmuch-search-target-thread)
 (defvar notmuch-search-target-line)
-- 
1.7.1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch