Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 69 / a46523c87659cf1009094a183ff7ebd0b1cd2e
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 A7FCB421197\r
6         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:22:36 -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.7\r
10 X-Spam-Level: \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 3MRn8cW+DxX9 for <notmuch@notmuchmail.org>;\r
16         Tue, 17 Jan 2012 13:22:36 -0800 (PST)\r
17 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com\r
18         [209.85.215.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 C0E4D421192\r
21         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:22:35 -0800 (PST)\r
22 Received: by eaah10 with SMTP id h10so2124218eaa.26\r
23         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:22:34 -0800 (PST)\r
24 Received: by 10.213.2.67 with SMTP id 3mr478324ebi.114.1326835354474;\r
25         Tue, 17 Jan 2012 13:22:34 -0800 (PST)\r
26 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
27         [80.220.92.23])\r
28         by mx.google.com with ESMTPS id x43sm90836488eef.8.2012.01.17.13.22.32\r
29         (version=SSLv3 cipher=OTHER); Tue, 17 Jan 2012 13:22:33 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
32 Subject: Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello\r
33         buffer\r
34 In-Reply-To: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>\r
35 References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>\r
36 User-Agent: Notmuch/0.11+76~g1de742d (http://notmuchmail.org) Emacs/23.3.1\r
37         (i686-pc-linux-gnu)\r
38 Date: Tue, 17 Jan 2012 23:22:30 +0200\r
39 Message-ID: <874nvukort.fsf@nikula.org>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain; charset=us-ascii\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Tue, 17 Jan 2012 21:22:36 -0000\r
55 \r
56 On Tue, 17 Jan 2012 23:34:08 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
57 > Before the change, "s" in notmuch-hello buffer would jump to the\r
58 > search box.  The patch changes the binding to `notmuch-search' which\r
59 > is consistent with all other notmuch buffers.\r
60 > ---\r
61 >  emacs/notmuch-hello.el |   19 ++++++-------------\r
62 >  1 files changed, 6 insertions(+), 13 deletions(-)\r
63\r
64 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
65 > index 02017ce..08fcd22 100644\r
66 > --- a/emacs/notmuch-hello.el\r
67 > +++ b/emacs/notmuch-hello.el\r
68 > @@ -29,9 +29,6 @@\r
69 >  (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))\r
70 >  (declare-function notmuch-poll "notmuch" ())\r
71 >  \r
72 > -(defvar notmuch-hello-search-bar-marker nil\r
73 > -  "The position of the search bar within the notmuch-hello buffer.")\r
74 > -\r
75 >  (defcustom notmuch-recent-searches-max 10\r
76 >    "The number of recent searches to store and display."\r
77 >    :type 'integer\r
78 > @@ -321,11 +318,6 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
79 >       (widget-insert "\n"))\r
80 >      found-target-pos))\r
81 >  \r
82 > -(defun notmuch-hello-goto-search ()\r
83 > -  "Put point inside the `search' widget."\r
84 > -  (interactive)\r
85 > -  (goto-char notmuch-hello-search-bar-marker))\r
86 \r
87 After this, what would the user have to do to bind some key to put the\r
88 point in the search box? If someone wants to restore old behaviour for\r
89 themselves.\r
90 \r
91 Also, it's perhaps out of scope for this patch, but it will become more\r
92 evident now that notmuch-search does not respect\r
93 notmuch-search-oldest-first when called without parameters like the new\r
94 's' keybinding does. This is the same in search view.\r
95 \r
96 \r
97 BR,\r
98 Jani.\r
99 \r
100 \r
101 > -\r
102 >  (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))\r
103 >  \r
104 >  (defun notmuch-hello-search-continuation()\r
105 > @@ -355,7 +347,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
106 >      (define-key map "G" 'notmuch-hello-poll-and-update)\r
107 >      (define-key map (kbd "<C-tab>") 'widget-backward)\r
108 >      (define-key map "m" 'notmuch-mua-new-mail)\r
109 > -    (define-key map "s" 'notmuch-hello-goto-search)\r
110 > +    (define-key map "s" 'notmuch-search)\r
111 >      map)\r
112 >    "Keymap for \"notmuch hello\" buffers.")\r
113 >  (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)\r
114 > @@ -468,7 +460,8 @@ Complete list of currently available key bindings:\r
115 >        (widget-insert " messages.\n"))\r
116 >  \r
117 >      (let ((found-target-pos nil)\r
118 > -       (final-target-pos nil))\r
119 > +       (final-target-pos nil)\r
120 > +       (search-bar-pos))\r
121 >        (let* ((saved-alist\r
122 >             ;; Filter out empty saved searches if required.\r
123 >             (if notmuch-show-empty-saved-searches\r
124 > @@ -500,7 +493,7 @@ Complete list of currently available key bindings:\r
125 >           (indent-rigidly start (point) notmuch-hello-indent)))\r
126 >  \r
127 >       (widget-insert "\nSearch: ")\r
128 > -     (setq notmuch-hello-search-bar-marker (point-marker))\r
129 > +     (setq search-bar-pos (point-marker))\r
130 >       (widget-create 'editable-field\r
131 >                      ;; Leave some space at the start and end of the\r
132 >                      ;; search boxes.\r
133 > @@ -589,7 +582,7 @@ Complete list of currently available key bindings:\r
134 >       (when notmuch-saved-searches\r
135 >         (widget-insert "Edit saved searches with the `edit' button.\n"))\r
136 >       (widget-insert "Hit RET or click on a saved search or tag name to view matching threads.\n")\r
137 > -     (widget-insert "`=' refreshes this screen. `s' jumps to the search box. `q' to quit.\n")\r
138 > +     (widget-insert "`=' refreshes this screen. `s' to search messages. `q' to quit.\n")\r
139 >       (let ((fill-column (- (window-width) notmuch-hello-indent)))\r
140 >         (center-region start (point))))\r
141 >  \r
142 > @@ -601,7 +594,7 @@ Complete list of currently available key bindings:\r
143 >         (widget-forward 1)))\r
144 >  \r
145 >        (unless (widget-at)\r
146 > -     (notmuch-hello-goto-search))))\r
147 > +     (goto-char search-bar-pos))))\r
148 >  \r
149 >    (run-hooks 'notmuch-hello-refresh-hook))\r
150 >  \r
151 > -- \r
152 > 1.7.8.3\r
153\r
154 > _______________________________________________\r
155 > notmuch mailing list\r
156 > notmuch@notmuchmail.org\r
157 > http://notmuchmail.org/mailman/listinfo/notmuch\r