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 AB9AC431FDB
\r
6 for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:15:47 -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 yzfyqp8iz9S6 for <notmuch@notmuchmail.org>;
\r
18 Sun, 18 Aug 2013 05:15:43 -0700 (PDT)
\r
19 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com
\r
20 [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id BFD44431FD2
\r
23 for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:15:04 -0700 (PDT)
\r
24 Received: by mail-wi0-f173.google.com with SMTP id en1so2205685wid.0
\r
25 for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:15:03 -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:in-reply-to:references;
\r
28 bh=eQM61RPlpLPmhcPwhimCL8lYgyUQdz8zvy0f6tasc50=;
\r
29 b=kimyMQ+h34tJ+U/vpNtGLVfDcbPJ+oD1wEJYsUkqsJ2UVyt0gY8JpE98LmjHwPKMDp
\r
30 vDkVwDlF/C0FMIdsj7n6LsD4969rFvOplWTMKH63oa9P26KCvpKMm2Cz0jIIM8Ev4VFd
\r
31 4hXUmEe6Hgss3QDUyvZ48DHaceTTtENVmrv+C6/5GukXPQwvnkStC5dH9re/omyD9MXb
\r
32 zxVihaJbKulqBhn/dg7xg+4mbCj6if2mEzdDTUu0ZHGj0QmJ/fbiOGWyQwgvnfhdo3AF
\r
33 93Xcs4xIzLKO8RjXiXoQ4clhyHN2nO0PmyMm6BvS562ozcc7a9lGLaxLNTxcnBQa2wfN
\r
35 X-Received: by 10.180.74.134 with SMTP id t6mr4486418wiv.56.1376828103644;
\r
36 Sun, 18 Aug 2013 05:15:03 -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 jf2sm9084554wic.2.1969.12.31.16.00.00
\r
39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
40 Sun, 18 Aug 2013 05:15:03 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v2 11/11] contrib: pick: use close-message-pane for reply etc
\r
44 Date: Sun, 18 Aug 2013 13:14:39 +0100
\r
45 Message-Id: <1376828079-21455-12-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Sun, 18 Aug 2013 12:15:47 -0000
\r
63 We can save some code duplication by using the new close-message-pane
\r
64 functionality for reply, forward, and new mail.
\r
66 contrib/notmuch-pick/notmuch-pick.el | 43 +++------------------------------
\r
67 1 files changed, 4 insertions(+), 39 deletions(-)
\r
69 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
\r
70 index 0e10c7c..3b86a5a 100644
\r
71 --- a/contrib/notmuch-pick/notmuch-pick.el
\r
72 +++ b/contrib/notmuch-pick/notmuch-pick.el
\r
73 @@ -236,6 +236,10 @@ FUNC."
\r
74 (define-key map "e" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))
\r
76 ;; bindings from show (or elsewhere) but we close the message pane first.
\r
77 + (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))
\r
78 + (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))
\r
79 + (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))
\r
80 + (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))
\r
81 (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))
\r
82 (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))
\r
84 @@ -246,10 +250,6 @@ FUNC."
\r
85 (define-key map "=" 'notmuch-pick-refresh-view)
\r
86 (define-key map "s" 'notmuch-pick-to-search)
\r
87 (define-key map "z" 'notmuch-pick-to-pick)
\r
88 - (define-key map "m" 'notmuch-pick-new-mail)
\r
89 - (define-key map "f" 'notmuch-pick-forward-message)
\r
90 - (define-key map "r" 'notmuch-pick-reply-sender)
\r
91 - (define-key map "R" 'notmuch-pick-reply)
\r
92 (define-key map "n" 'notmuch-pick-next-matching-message)
\r
93 (define-key map "p" 'notmuch-pick-prev-matching-message)
\r
94 (define-key map "N" 'notmuch-pick-next-message)
\r
95 @@ -599,41 +599,6 @@ message will be \"unarchived\", i.e. the tag changes in
\r
97 (get-buffer buffer-name))))
\r
99 -(defmacro with-current-notmuch-pick-message (&rest body)
\r
100 - "Evaluate body with current buffer set to the text of current message"
\r
102 - (let ((id (notmuch-pick-get-message-id)))
\r
103 - (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))
\r
104 - (with-current-buffer buf
\r
105 - (call-process notmuch-command nil t nil "show" "--format=raw" id)
\r
107 - (kill-buffer buf)))))
\r
109 -(defun notmuch-pick-new-mail (&optional prompt-for-sender)
\r
110 - "Compose new mail."
\r
111 - (interactive "P")
\r
112 - (notmuch-pick-close-message-window)
\r
113 - (notmuch-mua-new-mail prompt-for-sender ))
\r
115 -(defun notmuch-pick-forward-message (&optional prompt-for-sender)
\r
116 - "Forward the current message."
\r
117 - (interactive "P")
\r
118 - (notmuch-pick-close-message-window)
\r
119 - (with-current-notmuch-pick-message
\r
120 - (notmuch-mua-new-forward-message prompt-for-sender)))
\r
122 -(defun notmuch-pick-reply (&optional prompt-for-sender)
\r
123 - "Reply to the sender and all recipients of the current message."
\r
124 - (interactive "P")
\r
125 - (notmuch-pick-close-message-window)
\r
126 - (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender t))
\r
128 -(defun notmuch-pick-reply-sender (&optional prompt-for-sender)
\r
129 - "Reply to the sender of the current message."
\r
130 - (interactive "P")
\r
131 - (notmuch-pick-close-message-window)
\r
132 - (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender nil))
\r
134 (defun notmuch-pick-clean-address (address)
\r
135 "Try to clean a single email ADDRESS for display. Return
\r
136 AUTHOR_NAME if present, otherwise return AUTHOR_EMAIL. Return
\r