1 Return-Path: <markwalters1009@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 12E09431FD4
\r
6 for <notmuch@notmuchmail.org>; Sun, 30 Jun 2013 01:55:31 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id P2ArrPPUci2D for <notmuch@notmuchmail.org>;
\r
18 Sun, 30 Jun 2013 01:55:24 -0700 (PDT)
\r
19 Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com
\r
20 [74.125.82.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 F3CEF431FBD for <notmuch@notmuchmail.org>; Sun, 30 Jun 2013 01:55:20 -0700
\r
24 Received: by mail-wg0-f46.google.com with SMTP id c11so2837110wgh.1
\r
25 for <notmuch@notmuchmail.org>; Sun, 30 Jun 2013 01:55:19 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=XzJaoAhElxwtShCfEiBQOzCEn0t/I9eQ6eGGSkiLjsU=;
\r
29 b=xcgiMIiev4mAUy2f7PCEhUvXk80SRXOWBPeGWUg7Gy4CNaDaoko0Z9ekKW3F/6q0SY
\r
30 Zbp1VD+vGLVSH/NuUBR3uR7WhAcJ6cwCcYG0OZJGwsT06aWAZ6V2/TWUs2hxh7a6zld+
\r
31 HYlbvz8z1hIB00g8rBomN9EFt8TzEMD3EhiOcOi5nQbPqczduOE93C/kBOShc7x8pQ9f
\r
32 mQUa1fDTl+lgvYFD1bHBpVl21mD4ivWZDAt9+VUaJ5ZaTaz9fXIkSD5bjqHixDcRYIsF
\r
33 YFhfJ1DKxtw89p4qh78mkxWV6BsS4AL3HvbDxxfQmfIu0GLDy8REESGqKsgbT4GBGRtv
\r
35 X-Received: by 10.194.8.163 with SMTP id s3mr17062287wja.41.1372582519924;
\r
36 Sun, 30 Jun 2013 01:55:19 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id fb9sm8604021wid.2.2013.06.30.01.55.18
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Sun, 30 Jun 2013 01:55:19 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v2 2/3] contrib: pick: remove hack
\r
45 notmuch-pick-show-match-message-with-wait
\r
46 Date: Sun, 30 Jun 2013 09:55:11 +0100
\r
47 Message-Id: <1372582512-10777-3-git-send-email-markwalters1009@gmail.com>
\r
48 X-Mailer: git-send-email 1.7.9.1
\r
49 In-Reply-To: <1372582512-10777-1-git-send-email-markwalters1009@gmail.com>
\r
50 References: <1372582512-10777-1-git-send-email-markwalters1009@gmail.com>
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Sun, 30 Jun 2013 08:55:31 -0000
\r
65 This function was a horrible hack (sleeping while waiting for the
\r
66 correct message). The new target code can just open the message in the
\r
67 message window when it arrives.
\r
69 contrib/notmuch-pick/notmuch-pick.el | 37 +++++++++++-----------------------
\r
70 1 files changed, 12 insertions(+), 25 deletions(-)
\r
72 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
\r
73 index ef16ca7..5639c7c 100644
\r
74 --- a/contrib/notmuch-pick/notmuch-pick.el
\r
75 +++ b/contrib/notmuch-pick/notmuch-pick.el
\r
77 (make-variable-buffer-local 'notmuch-pick-query-context)
\r
78 (defvar notmuch-pick-target-msg nil)
\r
79 (make-variable-buffer-local 'notmuch-pick-target-msg)
\r
80 +(defvar notmuch-pick-open-target nil)
\r
81 +(make-variable-buffer-local 'notmuch-pick-open-target)
\r
82 (defvar notmuch-pick-buffer-name nil)
\r
83 (make-variable-buffer-local 'notmuch-pick-buffer-name)
\r
84 ;; This variable is the window used for the message pane. It is set
\r
85 @@ -349,8 +351,8 @@ Does NOT change the database."
\r
86 (notmuch-pick (notmuch-search-find-thread-id)
\r
87 notmuch-search-query-string
\r
89 - (notmuch-prettify-subject (notmuch-search-find-subject)))
\r
90 - (notmuch-pick-show-match-message-with-wait))
\r
91 + (notmuch-prettify-subject (notmuch-search-find-subject))
\r
94 (defun notmuch-pick-message-window-kill-hook ()
\r
95 (let ((buffer (current-buffer)))
\r
96 @@ -489,22 +491,6 @@ message will be \"unarchived\", i.e. the tag changes in
\r
97 (when (window-live-p notmuch-pick-message-window)
\r
98 (notmuch-pick-show-message)))
\r
100 -(defun notmuch-pick-show-match-message-with-wait ()
\r
101 - "Show the first matching message but wait for it to appear or search to finish."
\r
103 - (unless (notmuch-pick-get-match)
\r
104 - (notmuch-pick-next-matching-message))
\r
105 - (while (and (not (notmuch-pick-get-match))
\r
106 - (get-buffer-process (current-buffer)))
\r
107 - (message "waiting for message")
\r
109 - (goto-char (point-min))
\r
110 - (unless (notmuch-pick-get-match)
\r
111 - (notmuch-pick-next-matching-message)))
\r
113 - (when (notmuch-pick-get-match)
\r
114 - (notmuch-pick-show-message)))
\r
116 (defun notmuch-pick-refresh-view ()
\r
119 @@ -658,7 +644,9 @@ unchanged ADDRESS if parsing fails."
\r
120 (string= msg-id target))
\r
121 (setq notmuch-pick-target-msg "found")
\r
122 (goto-char (point-max))
\r
123 - (forward-line -1))))
\r
124 + (forward-line -1)
\r
125 + (when notmuch-pick-open-target
\r
126 + (notmuch-pick-show-message)))))
\r
128 (defun notmuch-pick-insert-tree (tree depth tree-status first last)
\r
129 "Insert the message tree TREE at depth DEPTH in the current thread."
\r
130 @@ -778,13 +766,14 @@ Complete list of currently available key bindings:
\r
131 (notmuch-sexp-parse-partial-list 'notmuch-pick-insert-forest-thread
\r
134 -(defun notmuch-pick-worker (basic-query &optional query-context target buffer)
\r
135 +(defun notmuch-pick-worker (basic-query &optional query-context target buffer open-target)
\r
137 (notmuch-pick-mode)
\r
138 (setq notmuch-pick-basic-query basic-query)
\r
139 (setq notmuch-pick-query-context query-context)
\r
140 (setq notmuch-pick-buffer-name (buffer-name buffer))
\r
141 (setq notmuch-pick-target-msg target)
\r
142 + (setq notmuch-pick-open-target open-target)
\r
145 (goto-char (point-min))
\r
146 @@ -816,7 +805,7 @@ Complete list of currently available key bindings:
\r
147 (insert "End of search results.\n"))))))
\r
150 -(defun notmuch-pick (&optional query query-context target buffer-name show-first-match)
\r
151 +(defun notmuch-pick (&optional query query-context target buffer-name open-target)
\r
152 "Run notmuch pick with the given `query' and display the results"
\r
153 (interactive "sNotmuch pick: ")
\r
155 @@ -830,11 +819,9 @@ Complete list of currently available key bindings:
\r
156 ;; Don't track undo information for this buffer
\r
157 (set 'buffer-undo-list t)
\r
159 - (notmuch-pick-worker query query-context target buffer)
\r
160 + (notmuch-pick-worker query query-context target buffer open-target)
\r
162 - (setq truncate-lines t)
\r
163 - (when show-first-match
\r
164 - (notmuch-pick-show-match-message-with-wait))))
\r
165 + (setq truncate-lines t)))
\r
168 ;; Set up key bindings from the rest of notmuch.
\r