Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 73 / 1394b13ee36d8d7b99dfe3d79a17f01ee4d049
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 BEBB4431FAF\r
6         for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:28:40 -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\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 I3PgQTSxQFa6 for <notmuch@notmuchmail.org>;\r
16         Thu,  6 Sep 2012 08:28:39 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 6E585431FAE\r
19         for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:28:39 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 0C6151000E5;\r
22         Thu,  6 Sep 2012 18:28:47 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Michal Sojka <sojkam1@fel.cvut.cz>, Jani Nikula <jani@nikula.org>,\r
25         notmuch@notmuchmail.org\r
26 Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook,\r
27         etc\r
28 In-Reply-To: <87zk54yy84.fsf@steelpick.2x.cz>\r
29 References: <cover.1346596156.git.jani@nikula.org>\r
30         <87vcftbtmw.fsf@steelpick.2x.cz> <877gs9msy8.fsf@nikula.org>\r
31         <87zk54yy84.fsf@steelpick.2x.cz>\r
32 User-Agent: Notmuch/0.14+11~gd9bf007 (http://notmuchmail.org) Emacs/24.2.1\r
33         (x86_64-unknown-linux-gnu)\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
35         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
36         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
37 Date: Thu, 06 Sep 2012 18:28:46 +0300\r
38 Message-ID: <m2k3w7xj9t.fsf@guru.guru-group.fi>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Thu, 06 Sep 2012 15:28:40 -0000\r
54 \r
55 On Thu, Sep 06 2012, Michal Sojka wrote:\r
56 \r
57 > On Tue, Sep 04 2012, Jani Nikula wrote:\r
58 >> On Tue, 04 Sep 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
59 >>> On Sun, Sep 02 2012, Jani Nikula wrote:\r
60 >>>> Hi all, v2 of [1] addressing review comments: added NEWS, improved\r
61 >>>> documentation, made the query customizable.\r
62 >>>>\r
63 >>>> [1]\r
64 >>>>     id:"37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org"\r
65 >>>\r
66 >>> Hello Jani,\r
67 >>>\r
68 >>> if I understand correctly, the goal of this patchset is to display the\r
69 >>> message with the difference in the number of messages before and after\r
70 >>> refresh of notmuch-hello.\r
71 >>\r
72 >> Difference between two refreshes of notmuch-hello to be specific.\r
73 >>\r
74 >>> I think the current implementation is unnecessarily complicated. It\r
75 >>> would be sufficient to implement this directly in `notmuch-hello'\r
76 >>> without any hook. If `notmuch-hello-refresh-status-query' is nil\r
77 >>> (default) no message would be shown. If it is configured to something\r
78 >>> else, the message would be shown provided that no-display is nil. This\r
79 >>> way you don't have to break existing user's hooks and achieve the same\r
80 >>> behavior, don't you?\r
81 >>\r
82 >> I think it would be useful to pass no-display to hooks anyway,\r
83 >> regardless of the use here.\r
84 >\r
85 > I'm strongly against breaking existing user's setups without a good\r
86 > reason. The meaning of no-display parameter, as I understand it, is only\r
87 > to tells whether the refresh should happen in background or foreground.\r
88 > Isn't there any other method for hooks to check for this conditions? For\r
89 > example something like checking whether notmuch-hello buffer is shown in\r
90 > a window of the active frame? Or a simple (perhaps buffer-local)\r
91 > variable can contain this information.\r
92 \r
93 I mentioned using no-display from dynamic scope -- which isn't very\r
94 good solution in a long run. Lately I've been leaning to Jani's suggestion\r
95 by just calling refresh-hook with no-display arg.... But if there is\r
96 well-established way to provide this information to hooks without\r
97 adding this argument in the hook call then that could be used..\r
98 \r
99 > I don't know what people use notmuch-hello-refresh-hook for. I suppose\r
100 > that your use case (displaying a message outside of hello buffer) is\r
101 > rather an exception than a typical use.\r
102 \r
103 In any case, I think the refresh-hook needs to know this no-display\r
104 information, somehow. If there is no other good way than giving it\r
105 as an argument to the hook then that should be done (by pushing patches\r
106 1-3).\r
107 \r
108 >> I don't see that as a big reason to do this one way or the other.\r
109 >> Having this implemented directly in notmuch-hello does not make this\r
110 >> less complicated either.\r
111 >\r
112 > That's true, but it would be simpler for users to set it up. With your\r
113 > patches, users would have to configure the variable (query) as well as\r
114 > the hook. I propose to have only one place to configure this feature.\r
115 \r
116 I've been thinking that Jani's way to provide the information to minibuffer\r
117 is a bit better than provide it in hello buffer -- as I think there is a\r
118 small "imperfection" that may irritate users: The default '*' is in use.\r
119 The hello buffer is refreshed (via emacsclient or something?) with\r
120 no-display t -- message count changes but the reference count\r
121 (notmuch-hello-refresh-count) keeps the same. Next time the hello buffer is\r
122 visible, showing current message count -- and user refreshes it.  In most\r
123 cases message count change in hello buffer is different that what will be\r
124 shown in minibuffer.\r
125 \r
126 Now, If this "imperfection" reason enough to have this feature available\r
127 from wiki/contrib. \r
128 \r
129 If not, then the decision between hook/part of notmuch-hello is to be done:\r
130 \r
131 1) If hook, then one less if's to be used -- and customization useful for\r
132 those who don't (add-hook...) more hooks there.\r
133 \r
134 2) If somewhere in notmuch-hello processing then this "query-variable"\r
135 (named appropriately) can be used to check whether this feature is in \r
136 use; if nil then not, otherwise it contains the query variable to be used\r
137 in (notmuch-command "count" ...) call.\r
138 \r
139 > -Michal\r
140 \r
141 Tomi\r