Re: [PATCH 00/11] Fix search tagging races
[notmuch-archives.git] / 53 / b4cc056cf317f6ac707ffc56b688765b8b09ce
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 22F6C431FC4\r
6         for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 20:38:55 -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 n4TURv6Jpj07 for <notmuch@notmuchmail.org>;\r
16         Thu, 12 Jul 2012 20:38:53 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
18         [18.7.68.34])\r
19         by olra.theworths.org (Postfix) with ESMTP id 532C9431FAE\r
20         for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 20:38:53 -0700 (PDT)\r
21 X-AuditID: 12074422-b7f1f6d00000090b-ab-4fff984c5370\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
23         by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 64.51.02315.C489FFF4; Thu, 12 Jul 2012 23:38:52 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q6D3cqlj006672; \r
27         Thu, 12 Jul 2012 23:38:52 -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 q6D3coMa008373\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Thu, 12 Jul 2012 23:38:51 -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 1SpWiQ-0005ao-Hn; Thu, 12 Jul 2012 23:38:50 -0400\r
37 Date: Thu, 12 Jul 2012 23:38:50 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Jani Nikula <jani@nikula.org>\r
40 Subject: Re: [PATCH 1/3] emacs: add no-display arg to\r
41         notmuch-hello-refresh-hook\r
42 Message-ID: <20120713033850.GM7332@mit.edu>\r
43 References:\r
44  <37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org>\r
45         <20120710014946.GB7332@mit.edu>\r
46         <CAB+hUn8W_x_BNbzmWuyzReX-oaP67OK0t8y-yNZ5cKfRNdwOmg@mail.gmail.com>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=iso-8859-1\r
49 Content-Disposition: inline\r
50 Content-Transfer-Encoding: 8bit\r
51 In-Reply-To:\r
52  <CAB+hUn8W_x_BNbzmWuyzReX-oaP67OK0t8y-yNZ5cKfRNdwOmg@mail.gmail.com>\r
53 User-Agent: Mutt/1.5.21 (2010-09-15)\r
54 X-Brightmail-Tracker:\r
55  H4sIAAAAAAAAA+NgFprDKsWRmVeSWpSXmKPExsUixCmqrOsz47+/wZ2lphZN050trt+cyezA\r
56         5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZXTfWcde8Feg4ubTN+wNjK28XYycHBICJhIn\r
57         rm5ihLDFJC7cW8/WxcjFISSwj1Hi8rc3UM4GRoklS/YwQzgnmST2N09jgnCWMEo0333CBtLP\r
58         IqAqceL2UVYQm01AQ2Lb/uVgc0UEFCU2n9wPZjMLSEt8+93MBGILCwRJ9N46CGbzCmhLtG24\r
59         zQ63e8KSjcwQCUGJkzOfsEA060js3HoHaBkH2KDl/zggwvISzVtng5VzCgRKNDw6CWaLCqhI\r
60         TDm5jW0Co/AsJJNmIZk0C2HSLCSTFjCyrGKUTcmt0s1NzMwpTk3WLU5OzMtLLdI11cvNLNFL\r
61         TSndxAiKBHYXpR2MPw8qHWIU4GBU4uH9FfvfX4g1say4MvcQoyQHk5Io78rJQCG+pPyUyozE\r
62         4oz4otKc1OJDjBIczEoivArTgHK8KYmVValF+TApaQ4WJXHeayk3/YUE0hNLUrNTUwtSi2Cy\r
63         MhwcShK8q6cDNQoWpaanVqRl5pQgpJk4OEGG8wANnwFSw1tckJhbnJkOkT/FqCglztsMkhAA\r
64         SWSU5sH1whLVK0ZxoFeEeeeDVPEAkxxc9yugwUxAg2f9/AcyuCQRISXVwBjP8Ichx29dwMSA\r
65         0kb5+pPPUhJ1Dnabfg1a12bPcdCVW7h1g9H0jkvHjzccnjd5gsuqNtnagOjAt8zr0t5sOdW7\r
66         4Xzkxbuc/08V+Ub2Xz1h9WK2pPimHwc3nPrOErodmK71LmSJfbmR9tHY8/abOFZeZd3q5J5P\r
67         drnOpkV5hvNjGvTXT97YpMRSnJFoqMVcVJwIAGZOpzAvAwAA\r
68 Cc: notmuch@notmuchmail.org\r
69 X-BeenThere: notmuch@notmuchmail.org\r
70 X-Mailman-Version: 2.1.13\r
71 Precedence: list\r
72 List-Id: "Use and development of the notmuch mail system."\r
73         <notmuch.notmuchmail.org>\r
74 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
76 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
77 List-Post: <mailto:notmuch@notmuchmail.org>\r
78 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
79 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
80         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
81 X-List-Received-Date: Fri, 13 Jul 2012 03:38:55 -0000\r
82 \r
83 Quoth Jani Nikula on Jul 10 at  8:10 am:\r
84 >    On Jul 10, 2012 4:49 AM, "Austin Clements" <[1]amdragon@mit.edu> wrote:\r
85 >    >\r
86 >    > Quoth Jani Nikula on Jun 15 at  6:53 pm:\r
87 >    > > Add no-display arg to notmuch-hello-refresh-hook to allow each hook to\r
88 >    > > decide what is appropriate when no-display is t, which is typically\r
89 >    > > the case when called non-interactively. This is used by the following\r
90 >    > > patch.\r
91 >    > >\r
92 >    > > This breaks existing hooks people might have, which will now need to\r
93 >    > > accept the argument.\r
94 >    > >\r
95 >    > > Signed-off-by: Jani Nikula <[2]jani@nikula.org>\r
96 >    >\r
97 >    > This seems like an overloaded use of no-display.  If I'm reading the\r
98 >    > code right, no-display indicates whether or not the notmuch-hello\r
99 >    > buffer should be switched to and seems like a workaround for some\r
100 >    > particular corner-case (I'm not even sure what).  This seems like a\r
101 >    > strange condition to predicate a hook on (but maybe I just don't\r
102 >    > understand).  What condition, abstractly speaking, is\r
103 >    > notmuch-hello-refresh-status-message trying to run under?\r
104\r
105 >    IIUC, no-display is useful for calling refresh from outside of emacs, e.g.\r
106 >    from post-new hook in an automated fashion, so you can have an up-to-date\r
107 >    buffer when you switch to it. There's no point in displaying the refresh\r
108 >    message when you don't also switch to the buffer, is there? And this way\r
109 >    you'll get the diff between the manual (through user interaction)\r
110 >    refreshes of the buffer, not between two cron jobs.\r
111 \r
112 Oh, I see.  This makes more sense.  The only use of no-display in the\r
113 notmuch code I can find appears to be to refresh the hello buffer when\r
114 you exit a search buffer started from hello, when it might actually\r
115 make sense to run the difference hook in your patch (I assume it wants\r
116 to avoid switching to the hello buffer in this case because the buffer\r
117 order may have changed?  Of course, there are other ways to get to the\r
118 hello buffer other than exiting a search buffer started from it...  I\r
119 found all of this code very confusing).\r
120 \r
121 Maybe this just needs better documentation?\r