1 Return-Path: <jani@nikula.org>
\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 EC4E3431FB6
\r
6 for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 02:39:04 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 mznhgNfTAXqU for <notmuch@notmuchmail.org>;
\r
16 Tue, 17 Apr 2012 02:39:01 -0700 (PDT)
\r
17 Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com
\r
18 [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 205B2431FAE
\r
21 for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 02:39:01 -0700 (PDT)
\r
22 Received: by qcsk26 with SMTP id k26so4638238qcs.26
\r
23 for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 02:39:00 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type:x-gm-message-state;
\r
28 bh=bsGv5q6ei3tbgBTSC50ZRzS/yPrawFYCzUzN4/jmAas=;
\r
29 b=Ng0X64m6mT5k3Q6ATESHfXS0l+JiX5OEHwWZnteGK8SsZCBNinSrYCr2dgOH8zSwR2
\r
30 btbji+gGbgPd/Pj+MYAy5QLGMxGEyD/XatxkGXUngrmfS9ATcbdn9loMfW1Whx73L3Z/
\r
31 WActgZ9p7KfZMF29Vxg2x3usg1u9JlGZ9Q4zWYJ8mLgZ4RCkSoRnSgZJvz1kUgIY+Xiv
\r
32 q6KpA3bnWOlkoHZyCdXiYl+iaELn4p92LCrcSx7uoOF2AGkzTMt5GVAT6VMCIqUrhQM/
\r
33 LQFs364C/ah56V2lmvnOVZt5GKZ70qhn35b2RmtS4zVhx9EC3Xqrhar9yqbv4AN8cuLi
\r
35 Received: by 10.224.185.201 with SMTP id cp9mr20101814qab.91.1334655540436;
\r
36 Tue, 17 Apr 2012 02:39:00 -0700 (PDT)
\r
37 Received: from localhost (nikula.org. [92.243.24.172])
\r
38 by mx.google.com with ESMTPS id z3sm4640951qao.9.2012.04.17.02.38.58
\r
39 (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 02:38:59 -0700 (PDT)
\r
40 From: Jani Nikula <jani@nikula.org>
\r
41 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org
\r
42 Subject: Re: [RFC PATCH 4/4] emacs: add notmuch hello refresh hook to place
\r
44 In-Reply-To: <871unmoh0l.fsf@gmail.com>
\r
46 <bcfdc0d1969997e89e5abe0b320d77ee2109796a.1334651669.git.jani@nikula.org>
\r
47 <c846baf8b367f94d1936887100bc584e7f86e0af.1334651669.git.jani@nikula.org>
\r
48 <871unmoh0l.fsf@gmail.com>
\r
49 User-Agent: Notmuch/0.11.1+222~ga47a98c (http://notmuchmail.org) Emacs/23.1.1
\r
51 Date: Tue, 17 Apr 2012 09:38:57 +0000
\r
52 Message-ID: <87bomqvgsu.fsf@nikula.org>
\r
54 Content-Type: text/plain; charset=us-ascii
\r
56 ALoCoQl3wXVOV9KkEujknCKIpvJuy2DBN79IcE92zuP2MJ7KPwKdabAGArqvoilawaryBP2AuX0B
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Tue, 17 Apr 2012 09:39:05 -0000
\r
71 On Tue, 17 Apr 2012 13:16:10 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
\r
72 > Jani Nikula <jani@nikula.org> writes:
\r
74 > > Add support for putting point to a widget after refresh through a
\r
75 > > hook. This approximates the old behaviour.
\r
77 > I may be wrong, but this looks to me like a hack that cannot work well.
\r
78 > See my first reply in the thread for ideas on how to better implement
\r
79 > this functionality.
\r
81 This isn't very much unlike how the current code finds a widget before
\r
82 refreshing. The difference is that this is based on a saved and restored
\r
83 point, which indeed does have it's inaccuracies.
\r
92 > > emacs/notmuch-hello.el | 8 +++++++-
\r
93 > > 1 files changed, 7 insertions(+), 1 deletions(-)
\r
95 > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
96 > > index 13da146..07e64d4 100644
\r
97 > > --- a/emacs/notmuch-hello.el
\r
98 > > +++ b/emacs/notmuch-hello.el
\r
99 > > @@ -148,7 +148,8 @@ International Bureau of Weights and Measures."
\r
100 > > (defcustom notmuch-hello-refresh-hook nil
\r
101 > > "Functions called after updating a `notmuch-hello' buffer."
\r
103 > > - :options '(notmuch-hello-refresh-status-message)
\r
104 > > + :options '(notmuch-hello-refresh-status-message
\r
105 > > + notmuch-hello-refresh-point-to-widget)
\r
106 > > :group 'notmuch-hello
\r
107 > > :group 'notmuch-hooks)
\r
109 > > @@ -752,6 +753,11 @@ Used internally by `notmuch-hello-refresh-status-message'.")
\r
110 > > (notmuch-hello-nice-number (- diff-count))))))
\r
111 > > (setq notmuch-hello-refresh-count new-count))))
\r
113 > > +(defun notmuch-hello-refresh-point-to-widget (no-display)
\r
114 > > + "Hook to place point to widget after notmuch-hello refresh."
\r
115 > > + (widget-backward 1)
\r
116 > > + (widget-forward 1))
\r
119 > > (defun notmuch-hello (&optional no-display)
\r
120 > > "Run notmuch and display saved searches, known tags, etc."
\r
124 > > _______________________________________________
\r
125 > > notmuch mailing list
\r
126 > > notmuch@notmuchmail.org
\r
127 > > http://notmuchmail.org/mailman/listinfo/notmuch
\r