--- /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 BEBB4431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Sep 2012 08:28:40 -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 I3PgQTSxQFa6 for <notmuch@notmuchmail.org>;\r
+ Thu, 6 Sep 2012 08:28: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 6E585431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Sep 2012 08:28:39 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 0C6151000E5;\r
+ Thu, 6 Sep 2012 18:28:47 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, Jani Nikula <jani@nikula.org>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook,\r
+ etc\r
+In-Reply-To: <87zk54yy84.fsf@steelpick.2x.cz>\r
+References: <cover.1346596156.git.jani@nikula.org>\r
+ <87vcftbtmw.fsf@steelpick.2x.cz> <877gs9msy8.fsf@nikula.org>\r
+ <87zk54yy84.fsf@steelpick.2x.cz>\r
+User-Agent: Notmuch/0.14+11~gd9bf007 (http://notmuchmail.org) Emacs/24.2.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: Thu, 06 Sep 2012 18:28:46 +0300\r
+Message-ID: <m2k3w7xj9t.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: Thu, 06 Sep 2012 15:28:40 -0000\r
+\r
+On Thu, Sep 06 2012, Michal Sojka wrote:\r
+\r
+> On Tue, Sep 04 2012, Jani Nikula wrote:\r
+>> On Tue, 04 Sep 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+>>> On Sun, Sep 02 2012, Jani Nikula wrote:\r
+>>>> Hi all, v2 of [1] addressing review comments: added NEWS, improved\r
+>>>> documentation, made the query customizable.\r
+>>>>\r
+>>>> [1]\r
+>>>> id:"37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org"\r
+>>>\r
+>>> Hello Jani,\r
+>>>\r
+>>> if I understand correctly, the goal of this patchset is to display the\r
+>>> message with the difference in the number of messages before and after\r
+>>> refresh of notmuch-hello.\r
+>>\r
+>> Difference between two refreshes of notmuch-hello to be specific.\r
+>>\r
+>>> I think the current implementation is unnecessarily complicated. It\r
+>>> would be sufficient to implement this directly in `notmuch-hello'\r
+>>> without any hook. If `notmuch-hello-refresh-status-query' is nil\r
+>>> (default) no message would be shown. If it is configured to something\r
+>>> else, the message would be shown provided that no-display is nil. This\r
+>>> way you don't have to break existing user's hooks and achieve the same\r
+>>> behavior, don't you?\r
+>>\r
+>> I think it would be useful to pass no-display to hooks anyway,\r
+>> regardless of the use here.\r
+>\r
+> I'm strongly against breaking existing user's setups without a good\r
+> reason. The meaning of no-display parameter, as I understand it, is only\r
+> to tells whether the refresh should happen in background or foreground.\r
+> Isn't there any other method for hooks to check for this conditions? For\r
+> example something like checking whether notmuch-hello buffer is shown in\r
+> a window of the active frame? Or a simple (perhaps buffer-local)\r
+> variable can contain this information.\r
+\r
+I mentioned using no-display from dynamic scope -- which isn't very\r
+good solution in a long run. Lately I've been leaning to Jani's suggestion\r
+by just calling refresh-hook with no-display arg.... But if there is\r
+well-established way to provide this information to hooks without\r
+adding this argument in the hook call then that could be used..\r
+\r
+> I don't know what people use notmuch-hello-refresh-hook for. I suppose\r
+> that your use case (displaying a message outside of hello buffer) is\r
+> rather an exception than a typical use.\r
+\r
+In any case, I think the refresh-hook needs to know this no-display\r
+information, somehow. If there is no other good way than giving it\r
+as an argument to the hook then that should be done (by pushing patches\r
+1-3).\r
+\r
+>> I don't see that as a big reason to do this one way or the other.\r
+>> Having this implemented directly in notmuch-hello does not make this\r
+>> less complicated either.\r
+>\r
+> That's true, but it would be simpler for users to set it up. With your\r
+> patches, users would have to configure the variable (query) as well as\r
+> the hook. I propose to have only one place to configure this feature.\r
+\r
+I've been thinking that Jani's way to provide the information to minibuffer\r
+is a bit better than provide it in hello buffer -- as I think there is a\r
+small "imperfection" that may irritate users: The default '*' is in use.\r
+The hello buffer is refreshed (via emacsclient or something?) with\r
+no-display t -- message count changes but the reference count\r
+(notmuch-hello-refresh-count) keeps the same. Next time the hello buffer is\r
+visible, showing current message count -- and user refreshes it. In most\r
+cases message count change in hello buffer is different that what will be\r
+shown in minibuffer.\r
+\r
+Now, If this "imperfection" reason enough to have this feature available\r
+from wiki/contrib. \r
+\r
+If not, then the decision between hook/part of notmuch-hello is to be done:\r
+\r
+1) If hook, then one less if's to be used -- and customization useful for\r
+those who don't (add-hook...) more hooks there.\r
+\r
+2) If somewhere in notmuch-hello processing then this "query-variable"\r
+(named appropriately) can be used to check whether this feature is in \r
+use; if nil then not, otherwise it contains the query variable to be used\r
+in (notmuch-command "count" ...) call.\r
+\r
+> -Michal\r
+\r
+Tomi\r