[PATCH v2 14/14] cli/reply: only pass gmime message to add recipients to reply message
[notmuch-archives.git] / 8c / a41a977f859e3cb41863f2d65665101b9c0b04
1 Return-Path: <amdragon@mit.edu>\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 72F71431FAF\r
6         for <notmuch@notmuchmail.org>; Mon,  6 Aug 2012 16:47:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 CM2wVPwNjHzV for <notmuch@notmuchmail.org>;\r
16         Mon,  6 Aug 2012 16:47:37 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU\r
18         [18.9.25.15])\r
19         by olra.theworths.org (Postfix) with ESMTP id E4D8C431FAE\r
20         for <notmuch@notmuchmail.org>; Mon,  6 Aug 2012 16:47:36 -0700 (PDT)\r
21 X-AuditID: 1209190f-b7f306d0000008b4-84-502057971a31\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 12.69.02228.79750205; Mon,  6 Aug 2012 19:47:35 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q76NlYVE000859; \r
27         Mon, 6 Aug 2012 19:47:35 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q76NlXxQ024087\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Mon, 6 Aug 2012 19:47:33 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1SyX1I-0003y2-UO; Mon, 06 Aug 2012 19:47:32 -0400\r
37 Date: Mon, 6 Aug 2012 19:47:32 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: Small bug in json-search changes\r
41 Message-ID: <20120806234732.GM22601@mit.edu>\r
42 References: <87boinpqfg.fsf@qmul.ac.uk>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 Content-Disposition: inline\r
46 In-Reply-To: <87boinpqfg.fsf@qmul.ac.uk>\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)\r
48 X-Brightmail-Tracker:\r
49  H4sIAAAAAAAAA+NgFvrPIsWRmVeSWpSXmKPExsUixCmqrTs9XCHA4NNpRYvVc3ksrt+cyezA\r
50         5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZfzfcp+poI23YvKfzAbGw1xdjBwcEgImErMu\r
51         s3QxcgKZYhIX7q1n62Lk4hAS2Mcoce7fDHYIZz2jxJ77b6CcE0wSU+b3sYG0CAksYZTo7BIE\r
52         sVkEVCR2bl/FCmKzCWhIbNu/nBHEFhHQkbh9aAE7iM0sIC3x7XczE4gtLKArsbdxF1g9L1DN\r
53         8ztvGSFmqks0PLrBAhEXlDg58wkLRK+WxI1/L5lArgaZs/wfB4jJCbTq7MQMkApRoAumnNzG\r
54         NoFRaBaS5llImmchNC9gZF7FKJuSW6Wbm5iZU5yarFucnJiXl1qka6KXm1mil5pSuokRHM6S\r
55         /DsYvx1UOsQowMGoxMN7gUshQIg1say4MvcQoyQHk5Ior2IoUIgvKT+lMiOxOCO+qDQntfgQ\r
56         owQHs5II7x1foBxvSmJlVWpRPkxKmoNFSZz3aspNfyGB9MSS1OzU1ILUIpisDAeHkgTvsTCg\r
57         RsGi1PTUirTMnBKENBMHJ8hwHqDhh0FqeIsLEnOLM9Mh8qcYFaXEeZ+BJARAEhmleXC9sHTz\r
58         ilEc6BVh3kMgVTzAVAXX/QpoMBPQYG95OZDBJYkIKakGRr81646E2O0zOXdD1jR7lUdZwjy+\r
59         18x2T6dHr1NXrbQ5u0T8fqrFlk+Ls3daLlKpydBj+Dtr02Ulz8sNB42+f1c06dp9IrVno8nv\r
60         /ZocEVpTnv9eVHd7y5c4l33qOb71qiq3dol5FRS9r5jSPuvPgw3bjstcuSJ4v6mafZ5LyH5N\r
61         lQ2+D/2f1imxFGckGmoxFxUnAgD5yFh8EgMAAA==\r
62 Cc: notmuch@notmuchmail.org\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Mon, 06 Aug 2012 23:47:37 -0000\r
76 \r
77 Nice catch.  I think the solution is either exactly this, or we should\r
78 strip "thread:" off notmuch-search-target-thread when we set it.  I\r
79 would lean slightly toward the latter so we don't have to generate up\r
80 a new (identical) string on every notmuch-search-show-result call, but\r
81 I doubt it would make much difference in the grand scheme of things.\r
82 \r
83 Quoth Mark Walters on Aug 07 at 12:10 am:\r
84\r
85 > Hi\r
86\r
87 > I have found a small bug in the recent changes to notmuch search to use\r
88 > the JSON output. If you refresh the search buffer "point" does not stay\r
89 > on the same thread. \r
90\r
91 > I think the problem is that notmuch-search-refresh-view calls notmuch\r
92 > search with target-thread set to notmuch-search-find-thread-id which\r
93 > returns the thread-id with "thread:" prefixed, whereas\r
94 > notmuch-search-show-result checks for a match with (plist-get result\r
95 > :thread) which is the thread id with no prefix.\r
96\r
97 > The patch below fixes this but I am not sure it is the nicest fix.\r
98\r
99 > Best wishes\r
100\r
101 > Mark\r
102\r
103 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
104 > index d2d82a9..a53d5a0 100644\r
105 > --- a/emacs/notmuch.el\r
106 > +++ b/emacs/notmuch.el\r
107 > @@ -798,7 +798,7 @@ non-authors is found, assume that all of the authors match."\r
108 >       (insert "\n")\r
109 >       (notmuch-search-color-line beg (point) (plist-get result :tags))\r
110 >       (put-text-property beg (point) 'notmuch-search-result result))\r
111 > -      (when (string= (plist-get result :thread) notmuch-search-target-thread)\r
112 > +      (when (string= (concat "thread:" (plist-get result :thread)) notmuch-search-target-thread)\r
113 >       (setq notmuch-search-target-thread "found")\r
114 >       (goto-char beg)))))\r
115 >  \r
116\r