--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 29C56431E62\r
+ for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 13:23:49 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id bZjkjPjtBIHg for <notmuch@notmuchmail.org>;\r
+ Wed, 21 Aug 2013 13:23:39 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8493A431FC2\r
+ for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 13:23:39 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 97AAE100086;\r
+ Wed, 21 Aug 2013 23:23:33 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 11/11] contrib: pick: use close-message-pane for reply\r
+ etc\r
+In-Reply-To: <1376828079-21455-12-git-send-email-markwalters1009@gmail.com>\r
+References: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>\r
+ <1376828079-21455-12-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 21 Aug 2013 23:23:33 +0300\r
+Message-ID: <m238q294je.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 21 Aug 2013 20:23:49 -0000\r
+\r
+On Sun, Aug 18 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
+\r
+> We can save some code duplication by using the new close-message-pane\r
+> functionality for reply, forward, and new mail.\r
+> ---\r
+> contrib/notmuch-pick/notmuch-pick.el | 43 +++------------------------------\r
+> 1 files changed, 4 insertions(+), 39 deletions(-)\r
+>\r
+> diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+> index 0e10c7c..3b86a5a 100644\r
+> --- a/contrib/notmuch-pick/notmuch-pick.el\r
+> +++ b/contrib/notmuch-pick/notmuch-pick.el\r
+> @@ -236,6 +236,10 @@ FUNC."\r
+> (define-key map "e" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))\r
+> \r
+> ;; bindings from show (or elsewhere) but we close the message pane first.\r
+> + (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))\r
+> + (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))\r
+> + (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))\r
+> + (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))\r
+> (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))\r
+> (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))\r
+> \r
+> @@ -246,10 +250,6 @@ FUNC."\r
+> (define-key map "=" 'notmuch-pick-refresh-view)\r
+> (define-key map "s" 'notmuch-pick-to-search)\r
+> (define-key map "z" 'notmuch-pick-to-pick)\r
+> - (define-key map "m" 'notmuch-pick-new-mail)\r
+> - (define-key map "f" 'notmuch-pick-forward-message)\r
+> - (define-key map "r" 'notmuch-pick-reply-sender)\r
+> - (define-key map "R" 'notmuch-pick-reply)\r
+> (define-key map "n" 'notmuch-pick-next-matching-message)\r
+> (define-key map "p" 'notmuch-pick-prev-matching-message)\r
+> (define-key map "N" 'notmuch-pick-next-message)\r
+> @@ -599,41 +599,6 @@ message will be \"unarchived\", i.e. the tag changes in\r
+> target\r
+> (get-buffer buffer-name))))\r
+> \r
+> -(defmacro with-current-notmuch-pick-message (&rest body)\r
+> - "Evaluate body with current buffer set to the text of current message"\r
+> - `(save-excursion\r
+> - (let ((id (notmuch-pick-get-message-id)))\r
+> - (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))\r
+> - (with-current-buffer buf\r
+> - (call-process notmuch-command nil t nil "show" "--format=raw" id)\r
+> - ,@body)\r
+> - (kill-buffer buf)))))\r
+> -\r
+> -(defun notmuch-pick-new-mail (&optional prompt-for-sender)\r
+> - "Compose new mail."\r
+> - (interactive "P")\r
+> - (notmuch-pick-close-message-window)\r
+> - (notmuch-mua-new-mail prompt-for-sender ))\r
+\r
+This patch series generally LGTM. The only question I have left is how much\r
+it matters that e.g. the pick keybinding for new mail cannot use prefix\r
+argument to make notmuch-mua-new-mail to prompt-for-sender. Also, how is it\r
+made possible that with-current-notmuch-pick-message is not needed anymore ?\r
+\r
+Maybe, if there is problem with this prompt-for-sender, a followup patch\r
+could create another function like `notmuch-pick-close-message-pane-and`\r
+which does `(lambda (&optional arg)... and (interactive "P"). and use\r
+that in some keybindings.\r
+\r
+Tomi\r
+\r
+> -\r
+> -(defun notmuch-pick-forward-message (&optional prompt-for-sender)\r
+> - "Forward the current message."\r
+> - (interactive "P")\r
+> - (notmuch-pick-close-message-window)\r
+> - (with-current-notmuch-pick-message\r
+> - (notmuch-mua-new-forward-message prompt-for-sender)))\r
+> -\r
+> -(defun notmuch-pick-reply (&optional prompt-for-sender)\r
+> - "Reply to the sender and all recipients of the current message."\r
+> - (interactive "P")\r
+> - (notmuch-pick-close-message-window)\r
+> - (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender t))\r
+> -\r
+> -(defun notmuch-pick-reply-sender (&optional prompt-for-sender)\r
+> - "Reply to the sender of the current message."\r
+> - (interactive "P")\r
+> - (notmuch-pick-close-message-window)\r
+> - (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender nil))\r
+> -\r
+> (defun notmuch-pick-clean-address (address)\r
+> "Try to clean a single email ADDRESS for display. Return\r
+> AUTHOR_NAME if present, otherwise return AUTHOR_EMAIL. Return\r
+> -- \r
+> 1.7.9.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r