Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 70 / d1bb3ac3e72f83b71b26288bb6134dbb02edb0
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 0996F42119B\r
6         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:34 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id Wd+KwU1j+yKp for <notmuch@notmuchmail.org>;\r
17         Tue, 17 Jan 2012 13:30:33 -0800 (PST)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id DE4E9421192\r
22         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:32 -0800 (PST)\r
23 Received: by bkty12 with SMTP id y12so996579bkt.26\r
24         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type;\r
28         bh=wJX0rmKqD8TmKETlndtWRe+e763RvPtwGs4fyo20GeQ=;\r
29         b=r2aQq7zdUvL2d3XB1mTtDACcMdz0HTJIxCs+FAbCjQCH0JgbI9oFMdsiGM579m8Sou\r
30         Q1oJ10IobBRSAJzhYiA/WP6z7eFW348jOUvudYT0Osc59bW/0eDO0kjvUOaQsUzaMZAl\r
31         nLlOO69tn8qgBcqzw4JPOnTM9h2JJEjcMfAOo=\r
32 Received: by 10.204.10.65 with SMTP id o1mr7341616bko.19.1326835831639;\r
33         Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id d23sm49807712bkw.15.2012.01.17.13.30.30\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello\r
41         buffer\r
42 In-Reply-To: <874nvukort.fsf@nikula.org>\r
43 References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <874nvukort.fsf@nikula.org>\r
45 User-Agent: Notmuch/0.11+73~g8a5402e (http://notmuchmail.org) Emacs/23.3.1\r
46         (x86_64-pc-linux-gnu)\r
47 Date: Wed, 18 Jan 2012 01:29:36 +0400\r
48 Message-ID: <87mx9mvwzj.fsf@gmail.com>\r
49 MIME-Version: 1.0\r
50 Content-Type: text/plain; charset=us-ascii\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 17 Jan 2012 21:30:34 -0000\r
64 \r
65 [of course I sent this email privately, sorry for duplicates]\r
66 \r
67 On Tue, 17 Jan 2012 23:22:30 +0200, Jani Nikula <jani@nikula.org> wrote:\r
68 > On Tue, 17 Jan 2012 23:34:08 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
69 > > Before the change, "s" in notmuch-hello buffer would jump to the\r
70 > > search box.  The patch changes the binding to `notmuch-search' which\r
71 > > is consistent with all other notmuch buffers.\r
72 > > ---\r
73 > >  emacs/notmuch-hello.el |   19 ++++++-------------\r
74 > >  1 files changed, 6 insertions(+), 13 deletions(-)\r
75 > > \r
76 > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
77 > > index 02017ce..08fcd22 100644\r
78 > > --- a/emacs/notmuch-hello.el\r
79 > > +++ b/emacs/notmuch-hello.el\r
80 > > @@ -29,9 +29,6 @@\r
81 > >  (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))\r
82 > >  (declare-function notmuch-poll "notmuch" ())\r
83 > >  \r
84 > > -(defvar notmuch-hello-search-bar-marker nil\r
85 > > -  "The position of the search bar within the notmuch-hello buffer.")\r
86 > > -\r
87 > >  (defcustom notmuch-recent-searches-max 10\r
88 > >    "The number of recent searches to store and display."\r
89 > >    :type 'integer\r
90 > > @@ -321,11 +318,6 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
91 > >     (widget-insert "\n"))\r
92 > >      found-target-pos))\r
93 > >  \r
94 > > -(defun notmuch-hello-goto-search ()\r
95 > > -  "Put point inside the `search' widget."\r
96 > > -  (interactive)\r
97 > > -  (goto-char notmuch-hello-search-bar-marker))\r
98\r
99 > After this, what would the user have to do to bind some key to put the\r
100 > point in the search box? If someone wants to restore old behaviour for\r
101 > themselves.\r
102\r
103 \r
104 There is no way to do that.  From the previous discussions, I do not\r
105 remember anyone wanted the current "s" jumping behavior.  Let's wait for\r
106 some feedback and see if anyone wants that.  I would prefer to remove\r
107 this function and the global variable it uses.\r
108 \r
109 > Also, it's perhaps out of scope for this patch, but it will become more\r
110 > evident now that notmuch-search does not respect\r
111 > notmuch-search-oldest-first when called without parameters like the new\r
112 > 's' keybinding does. This is the same in search view.\r
113\r
114 \r
115 I agree that this is an issue.  But it is outisde of the scope of this\r
116 patch series.\r
117 \r
118 Regards,\r
119   Dmitry\r
120 \r
121\r
122 > BR,\r
123 > Jani.\r
124\r
125\r
126 > > -\r
127 > >  (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))\r
128 > >  \r
129 > >  (defun notmuch-hello-search-continuation()\r
130 > > @@ -355,7 +347,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
131 > >      (define-key map "G" 'notmuch-hello-poll-and-update)\r
132 > >      (define-key map (kbd "<C-tab>") 'widget-backward)\r
133 > >      (define-key map "m" 'notmuch-mua-new-mail)\r
134 > > -    (define-key map "s" 'notmuch-hello-goto-search)\r
135 > > +    (define-key map "s" 'notmuch-search)\r
136 > >      map)\r
137 > >    "Keymap for \"notmuch hello\" buffers.")\r
138 > >  (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)\r
139 > > @@ -468,7 +460,8 @@ Complete list of currently available key bindings:\r
140 > >        (widget-insert " messages.\n"))\r
141 > >  \r
142 > >      (let ((found-target-pos nil)\r
143 > > -     (final-target-pos nil))\r
144 > > +     (final-target-pos nil)\r
145 > > +     (search-bar-pos))\r
146 > >        (let* ((saved-alist\r
147 > >           ;; Filter out empty saved searches if required.\r
148 > >           (if notmuch-show-empty-saved-searches\r
149 > > @@ -500,7 +493,7 @@ Complete list of currently available key bindings:\r
150 > >         (indent-rigidly start (point) notmuch-hello-indent)))\r
151 > >  \r
152 > >     (widget-insert "\nSearch: ")\r
153 > > -   (setq notmuch-hello-search-bar-marker (point-marker))\r
154 > > +   (setq search-bar-pos (point-marker))\r
155 > >     (widget-create 'editable-field\r
156 > >                    ;; Leave some space at the start and end of the\r
157 > >                    ;; search boxes.\r
158 > > @@ -589,7 +582,7 @@ Complete list of currently available key bindings:\r
159 > >     (when notmuch-saved-searches\r
160 > >       (widget-insert "Edit saved searches with the `edit' button.\n"))\r
161 > >     (widget-insert "Hit RET or click on a saved search or tag name to view matching threads.\n")\r
162 > > -   (widget-insert "`=' refreshes this screen. `s' jumps to the search box. `q' to quit.\n")\r
163 > > +   (widget-insert "`=' refreshes this screen. `s' to search messages. `q' to quit.\n")\r
164 > >     (let ((fill-column (- (window-width) notmuch-hello-indent)))\r
165 > >       (center-region start (point))))\r
166 > >  \r
167 > > @@ -601,7 +594,7 @@ Complete list of currently available key bindings:\r
168 > >       (widget-forward 1)))\r
169 > >  \r
170 > >        (unless (widget-at)\r
171 > > -   (notmuch-hello-goto-search))))\r
172 > > +   (goto-char search-bar-pos))))\r
173 > >  \r
174 > >    (run-hooks 'notmuch-hello-refresh-hook))\r
175 > >  \r
176 > > -- \r
177 > > 1.7.8.3\r
178 > > \r
179 > > _______________________________________________\r
180 > > notmuch mailing list\r
181 > > notmuch@notmuchmail.org\r
182 > > http://notmuchmail.org/mailman/listinfo/notmuch\r