Re: Xapers
[notmuch-archives.git] / 85 / 853b438514d3ac899a43289e3c86bdb9f01710
1 Return-Path: <tomi.ollila@iki.fi>\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 CDA3C431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 13:04:40 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id mch18Op+imyJ for <notmuch@notmuchmail.org>;\r
16         Sun, 19 Feb 2012 13:04:40 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 0815F431FAE\r
19         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 13:04:40 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 0D9DB68055; Sun, 19 Feb 2012 23:04:38 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Pieter Praet <pieter@praet.org>, Notmuch Mail <notmuch@notmuchmail.org>\r
24 Subject: Re: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to\r
25         a thread (sending)"\r
26 In-Reply-To: <1329683908-5435-3-git-send-email-pieter@praet.org>\r
27 References: <1310313335-4159-1-git-send-email-pieter@praet.org>\r
28         <1329683908-5435-1-git-send-email-pieter@praet.org>\r
29         <1329683908-5435-3-git-send-email-pieter@praet.org>\r
30 User-Agent: Notmuch/0.11.1+198~g922c4d2 (http://notmuchmail.org) Emacs/23.3.1\r
31         (x86_64-unknown-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Sun, 19 Feb 2012 23:04:38 +0200\r
36 Message-ID: <m239a6wn4p.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain; charset=us-ascii\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 19 Feb 2012 21:04:40 -0000\r
52 \r
53 On Sun, 19 Feb 2012 21:38:26 +0100, Pieter Praet <pieter@praet.org> wrote:\r
54 > As pointed out in the previous commit, the test for replying from\r
55 > within Emacs didn't actually submit the reply. This one does.\r
56 > ---\r
57 >  test/emacs |   41 +++++++++++++++++++++++++++++++++++++++++\r
58 >  1 files changed, 41 insertions(+), 0 deletions(-)\r
59\r
60 > diff --git a/test/emacs b/test/emacs\r
61 > index 308d749..0f4f42b 100755\r
62 > --- a/test/emacs\r
63 > +++ b/test/emacs\r
64 > @@ -273,6 +273,47 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w\r
65 >  EOF\r
66 >  test_expect_equal_file OUTPUT EXPECTED\r
67 >  \r
68 > +test_begin_subtest "notmuch-search: replying to a thread (sending)"\r
69 > +$TEST_DIRECTORY/smtp-dummy sent_message &\r
70 > +smtp_dummy_pid=$!\r
71 > +test_emacs \\r
72 > +'(let ((message-send-mail-function '\''message-smtpmail-send-it)\r
73 > +       (smtpmail-smtp-server "localhost")\r
74 > +       (smtpmail-smtp-service "25025"))\r
75 > +  (notmuch-search "subject:\"testing message sent via SMTP\"")\r
76 > +  (notmuch-test-wait)\r
77 > +  (notmuch-search-reply-to-thread)\r
78 > +  (end-of-buffer)\r
79 > +  (newline)\r
80 > +  (insert "Reply to a message via Emacs with fake SMTP")\r
81 > +  (message-send-and-exit))' >/dev/null 2>&1\r
82 > +wait ${smtp_dummy_pid}\r
83 > +notmuch new >/dev/null\r
84 \r
85 The above part smells like CopyPasteProgramming; (old version of) \r
86 emacs_deliver_message copied (old as this version is lacking\r
87 opportunistic quit). \r
88 \r
89 Maybe the functionality of emacs_deliver_message needs to be\r
90 split into 3 parts: initialization, sending and finalization.\r
91 then other uses can use initialization and finalization parts\r
92 and provide their own sending part.\r
93 \r
94 I have work-in-progress code for initialization and finalization\r
95 parts of that and I don't want to do the changes in 2 places...\r
96 \r
97 Tomi\r