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 39A13431FAE
\r
6 for <notmuch@notmuchmail.org>; Mon, 9 Sep 2013 09:59:58 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 abrW0OqZf7Uj for <notmuch@notmuchmail.org>;
\r
16 Mon, 9 Sep 2013 09:59:50 -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 C96F9431FB6
\r
19 for <notmuch@notmuchmail.org>; Mon, 9 Sep 2013 09:59:47 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 42A51100090;
\r
22 Mon, 9 Sep 2013 19:59:41 +0300 (EEST)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH v2 0/9] emacs: Unify common key bindings and lots more
\r
26 In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu>
\r
27 References: <1378244725-18846-1-git-send-email-amdragon@mit.edu>
\r
28 User-Agent: Notmuch/0.16+68~g2e5340c (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Mon, 09 Sep 2013 19:59:40 +0300
\r
34 Message-ID: <m2ob82ue0z.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain; charset=utf-8
\r
37 Content-Transfer-Encoding: quoted-printable
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Mon, 09 Sep 2013 16:59:58 -0000
\r
52 On Wed, Sep 04 2013, Austin Clements <amdragon@MIT.EDU> wrote:
\r
54 > This is v2 of id:1377793557-28878-1-git-send-email-amdragon@mit.edu.
\r
55 > This fixes a problem found by Jani where notmuch-hello would reset
\r
56 > point placement when refreshing in Emacs 24. It also inverts the
\r
57 > sense of notmuch-hello-auto-refresh and makes it a defcustom
\r
58 > (originally I'd intended notmuch-hello-inhibit-auto-refresh for
\r
59 > internal use only, but both Mark and Jani expressed interest in
\r
62 I've been using this patch series a few days now it has worked fine.
\r
63 It took me a while to grok the notmuch-hello-window-configuration-change
\r
64 which imo provides nice piece of functionality.
\r
66 The whole patch series LGTM.
\r
71 > The diff from v1 follows
\r
73 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
74 > index 1d6c3a2..55c416a 100644
\r
75 > --- a/emacs/notmuch-hello.el
\r
76 > +++ b/emacs/notmuch-hello.el
\r
77 > @@ -232,6 +232,11 @@ supported for \"Customized queries section\" items."
\r
78 > notmuch-hello-query-section
\r
79 > (function :tag "Custom section"))))
\r
81 > +(defcustom notmuch-hello-auto-refresh t
\r
82 > + "Automatically refresh when returning to the notmuch-hello buffer."
\r
83 > + :group 'notmuch-hello
\r
86 > (defvar notmuch-hello-hidden-sections nil
\r
87 > "List of sections titles whose contents are hidden")
\r
89 > @@ -478,9 +483,6 @@ Such a list can be computed with `notmuch-hello-query=
\r
91 > ;; Lazy - rebuild everything.
\r
92 > (notmuch-hello no-display))
\r
94 > -(defvar notmuch-hello-inhibit-auto-refresh nil
\r
95 > - "Don't refresh notmuch-hello on window configuration changes.")
\r
97 > (defun notmuch-hello-window-configuration-change ()
\r
98 > "Hook function to update the hello buffer when it is switched to."
\r
99 > (let ((hello-buf (get-buffer "*notmuch-hello*"))
\r
100 > @@ -501,8 +503,11 @@ Such a list can be computed with `notmuch-hello-quer=
\r
102 > ;; is currently visible, was not visible on the last
\r
103 > ;; configuration change, and this is not a new window)
\r
104 > (setq do-refresh t)))))
\r
105 > - (when (and do-refresh (not notmuch-hello-inhibit-auto-refresh))
\r
106 > - (notmuch-hello t))
\r
107 > + (when (and do-refresh notmuch-hello-auto-refresh)
\r
108 > + ;; Refresh hello as soon as we get back to redisplay. On Emacs
\r
109 > + ;; 24, we can't do it right here because something in this
\r
110 > + ;; hook's call stack overrides hello's point placement.
\r
111 > + (run-at-time nil nil #'notmuch-hello t))
\r
112 > (when (null hello-buf)
\r
114 > (remove-hook 'window-configuration-change-hook
\r
115 > @@ -785,14 +790,15 @@ following:
\r
117 > ;; This may cause a window configuration change, so if the
\r
118 > ;; auto-refresh hook is already installed, avoid recursive refresh.
\r
119 > - (let ((notmuch-hello-inhibit-auto-refresh t))
\r
120 > + (let ((notmuch-hello-auto-refresh nil))
\r
122 > (set-buffer "*notmuch-hello*")
\r
123 > (switch-to-buffer "*notmuch-hello*")))
\r
125 > ;; Install auto-refresh hook
\r
126 > - (add-hook 'window-configuration-change-hook
\r
127 > - #'notmuch-hello-window-configuration-change)
\r
128 > + (when notmuch-hello-auto-refresh
\r
129 > + (add-hook 'window-configuration-change-hook
\r
130 > + #'notmuch-hello-window-configuration-change))
\r
132 > (let ((target-line (line-number-at-pos))
\r
133 > (target-column (current-column))
\r
135 > _______________________________________________
\r
136 > notmuch mailing list
\r
137 > notmuch@notmuchmail.org
\r
138 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
142 "kaik on m=C3=A4nt!"
\r