Re: [PATCH 09/11] cli/insert: add fail path to add_file_to_database
[notmuch-archives.git] / c7 / 3e44c98a7c8c0217ca2c87526feb8894f8fd98
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 EB016431FAF\r
6         for <notmuch@notmuchmail.org>; Wed,  9 Oct 2013 09:19:21 -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 z2jxCG5PN5oI for <notmuch@notmuchmail.org>;\r
16         Wed,  9 Oct 2013 09:19:13 -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 5F953431FAE\r
20         for <notmuch@notmuchmail.org>; Wed,  9 Oct 2013 09:19:13 -0700 (PDT)\r
21 X-AuditID: 1209190f-b7fa08e0000009c6-43-525582003fd0\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 19.79.02502.00285525; Wed,  9 Oct 2013 12:19:12 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r99GJBkq021983; \r
27         Wed, 9 Oct 2013 12:19:12 -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.8/8.12.4) with ESMTP id r99GJ9N8013385\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Wed, 9 Oct 2013 12:19:11 -0400\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1VTwTd-0005fI-5h; Wed, 09 Oct 2013 12:19:09 -0400\r
37 Date: Wed, 9 Oct 2013 12:19:08 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: [PATCH 00/11] Fix search tagging races\r
41 Message-ID: <20131009161907.GS21611@mit.edu>\r
42 References: <1381185201-25197-1-git-send-email-amdragon@mit.edu>\r
43         <87ob70kxg1.fsf@qmul.ac.uk>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <87ob70kxg1.fsf@qmul.ac.uk>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT12VoCg0y6G2xtFg9l8fi+s2ZzA5M\r
51         Hjtn3WX3eLbqFnMAUxSXTUpqTmZZapG+XQJXxok315kLpklUTH3TwtjAuFG4i5GTQ0LARGJO\r
52         9yRWCFtM4sK99WxdjFwcQgL7GCXWHzjGCuFsYJRoWLSYEcI5xSRx4s0VdpAWIYEljBLt3UJd\r
53         jBwcLAIqElfXFoCE2QQ0JLbtX84IYosI6EjcPrQArJxZQFri2+9mJhBbWMBYYv3OE8wgNi9Q\r
54         zbnmf4wQI+Mkjkw7ChUXlDg58wkLRK+WxI1/L5lAVoHMWf6PAyTMCbTq45urYCWiQBdMObmN\r
55         bQKj0Cwk3bOQdM9C6F7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI10QvN7NELzWldBMjKKQ5\r
56         Jfl3MH47qHSIUYCDUYmHt6IsNEiINbGsuDL3EKMkB5OSKK9pA1CILyk/pTIjsTgjvqg0J7X4\r
57         EKMEB7OSCG9cCVCONyWxsiq1KB8mJc3BoiTOe5PDPkhIID2xJDU7NbUgtQgmK8PBoSTBuw9k\r
58         qGBRanpqRVpmTglCmomDE2Q4D9DwmyA1vMUFibnFmekQ+VOMilLivMaNQAkBkERGaR5cLyzl\r
59         vGIUB3pFmFcUpIoHmK7gul8BDWYCGrz9ewjI4JJEhJRUA6PDkp6ybVLCtyQCfc3D1n48OyXU\r
60         8V9v3p45i9U593TuDu1aqMK7/9OCFN+sMx+OvkyafOuG0OGzF6bUJjzeF/FzpjenRf3UCxPL\r
61         9s9x4j2lcunElboVRh+Y97FlHvsfdMaiXCn7TlZa6L8qx9c9kjemH/i+8J3f8w+sjAwVHe8q\r
62         bp0sUi6oMa9RYinOSDTUYi4qTgQA+BV1qxQDAAA=\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Wed, 09 Oct 2013 16:19:22 -0000\r
77 \r
78 Quoth Mark Walters on Oct 08 at  8:56 am:\r
79\r
80 > Hello\r
81\r
82 > It's great that this might finally get done. But there is one problem\r
83 > currently.\r
84\r
85 > If you open a large search buffer and then do *-<tab> it will die as the\r
86 > tagging routine runs notmuch search to find a completion-list for the\r
87 > tag. (it runs notmuch search --output=tags <query>)\r
88 \r
89 Hmm.  If we implement docid queries (described in the TODO added by\r
90 this series), we should be able to get away with what we're doing now\r
91 without any serious performance problems...\r
92 \r
93 > We could just return all tags in this case. Or we could do something\r
94 > like the series\r
95 > id:1354263691-19715-1-git-send-email-markwalters1009@gmail.com\r
96 > which makes completion happen based on the tags visible to the user, not\r
97 > the tags actually in the database.\r
98 \r
99 OTOH, I think what you were going for in this series is the right\r
100 thing to do from a UI perspective anyway.  I'll try implementing\r
101 something along these lines, though I've got an idea that I think will\r
102 by more Elispy.  Currently `notmuch-tag' has this strange interface\r
103 where it can interactively prompt in some cases.  This isn't the right\r
104 way to do this.  `notmuch-tag' should be non-interactive and the\r
105 interactive tagging commands should have an interactive specification\r
106 that prompts for tags to change, right at the interactive entry point.\r
107 This should give us a clean place to provide a list of existing tags,\r
108 and would also let us do other nice things like specify a different\r
109 tag prompt for * commands, and maybe add a y/n prompt to confirm a *\r
110 tagging command.  It would also provide a convenient place to wait for\r
111 search results to finish coming in after prompting in the * command,\r
112 which would be awkward to do right now.\r
113 \r
114 > There is also a little discussion of this in my earlier attempt at\r
115 > fixing this: eg id:87mwy4smad.fsf@qmul.ac.uk\r
116\r
117 > Best wishes\r
118\r
119 > Mark\r
120\r
121 > On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
122 > > I was hacking on undo support for notmuch-emacs and sort of\r
123 > > accidentally wrote this instead.  This series fixes a set of\r
124 > > well-known races where tagging from search-mode unexpectedly affects\r
125 > > messages that arrived after the search was performed (and hence the\r
126 > > user doesn't know they're tagging them).  We've attacked this a few\r
127 > > times before, but have always run up against something that was\r
128 > > missing.  It turns out the pieces are finally all in place.\r
129 > >\r
130 > > The first five patches just clean various things up in preparation.\r
131 > > Patches 6 and 7 add support for tagging large queries, which would\r
132 > > otherwise become a problem when later patches start using explicit\r
133 > > message ID-based queries for tagging.  The remaining four patches\r
134 > > actually fix the search tagging races using explicit message ID-based\r
135 > > queries.\r
136 > >\r
137 > > It's a fairly long series, but none of the patches are very big.\r
138 > >\r
139 > > _______________________________________________\r
140 > > notmuch mailing list\r
141 > > notmuch@notmuchmail.org\r
142 > > http://notmuchmail.org/mailman/listinfo/notmuch\r