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 85824429E5F
\r
6 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 11:35:08 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 7H67blU2bOsk for <notmuch@notmuchmail.org>;
\r
17 Tue, 17 Jan 2012 11:35:08 -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 C9429429E3B
\r
22 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 11:35:07 -0800 (PST)
\r
23 Received: by bkty12 with SMTP id y12so894828bkt.26
\r
24 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 11:35:06 -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:date:message-id:x-mailer;
\r
27 bh=h+QL/zTWGbpzOqHNHi2omFUgIpIWxAkYmI6fuV2oEGQ=;
\r
28 b=AiWQ3BjCV5/0bFGHxm+M7CHfPRSuxmM/0LzJR8mTo9Zn71CRzYetwHGjg4yW4N8S5B
\r
29 NHNiasqzpaCByYSwD3oS56WQG+ErOzZFflrBlQm6FSzMy/+fjnSXmTY2Yhf41FixCZQ1
\r
30 STMj9Jy9GezkSyf11MbHRPke0lw1IMGDsFTbk=
\r
31 Received: by 10.204.10.66 with SMTP id o2mr7217873bko.104.1326828906391;
\r
32 Tue, 17 Jan 2012 11:35:06 -0800 (PST)
\r
33 Received: from localhost ([91.144.186.21])
\r
34 by mx.google.com with ESMTPS id e12sm49200059bko.14.2012.01.17.11.35.05
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Tue, 17 Jan 2012 11:35:05 -0800 (PST)
\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello
\r
41 Date: Tue, 17 Jan 2012 23:34:08 +0400
\r
42 Message-Id: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.8.3
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Tue, 17 Jan 2012 19:35:08 -0000
\r
58 Before the change, "s" in notmuch-hello buffer would jump to the
\r
59 search box. The patch changes the binding to `notmuch-search' which
\r
60 is consistent with all other notmuch buffers.
\r
62 emacs/notmuch-hello.el | 19 ++++++-------------
\r
63 1 files changed, 6 insertions(+), 13 deletions(-)
\r
65 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
66 index 02017ce..08fcd22 100644
\r
67 --- a/emacs/notmuch-hello.el
\r
68 +++ b/emacs/notmuch-hello.el
\r
70 (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))
\r
71 (declare-function notmuch-poll "notmuch" ())
\r
73 -(defvar notmuch-hello-search-bar-marker nil
\r
74 - "The position of the search bar within the notmuch-hello buffer.")
\r
76 (defcustom notmuch-recent-searches-max 10
\r
77 "The number of recent searches to store and display."
\r
79 @@ -321,11 +318,6 @@ should be. Returns a cons cell `(tags-per-line width)'."
\r
80 (widget-insert "\n"))
\r
83 -(defun notmuch-hello-goto-search ()
\r
84 - "Put point inside the `search' widget."
\r
86 - (goto-char notmuch-hello-search-bar-marker))
\r
88 (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))
\r
90 (defun notmuch-hello-search-continuation()
\r
91 @@ -355,7 +347,7 @@ should be. Returns a cons cell `(tags-per-line width)'."
\r
92 (define-key map "G" 'notmuch-hello-poll-and-update)
\r
93 (define-key map (kbd "<C-tab>") 'widget-backward)
\r
94 (define-key map "m" 'notmuch-mua-new-mail)
\r
95 - (define-key map "s" 'notmuch-hello-goto-search)
\r
96 + (define-key map "s" 'notmuch-search)
\r
98 "Keymap for \"notmuch hello\" buffers.")
\r
99 (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
\r
100 @@ -468,7 +460,8 @@ Complete list of currently available key bindings:
\r
101 (widget-insert " messages.\n"))
\r
103 (let ((found-target-pos nil)
\r
104 - (final-target-pos nil))
\r
105 + (final-target-pos nil)
\r
106 + (search-bar-pos))
\r
107 (let* ((saved-alist
\r
108 ;; Filter out empty saved searches if required.
\r
109 (if notmuch-show-empty-saved-searches
\r
110 @@ -500,7 +493,7 @@ Complete list of currently available key bindings:
\r
111 (indent-rigidly start (point) notmuch-hello-indent)))
\r
113 (widget-insert "\nSearch: ")
\r
114 - (setq notmuch-hello-search-bar-marker (point-marker))
\r
115 + (setq search-bar-pos (point-marker))
\r
116 (widget-create 'editable-field
\r
117 ;; Leave some space at the start and end of the
\r
119 @@ -589,7 +582,7 @@ Complete list of currently available key bindings:
\r
120 (when notmuch-saved-searches
\r
121 (widget-insert "Edit saved searches with the `edit' button.\n"))
\r
122 (widget-insert "Hit RET or click on a saved search or tag name to view matching threads.\n")
\r
123 - (widget-insert "`=' refreshes this screen. `s' jumps to the search box. `q' to quit.\n")
\r
124 + (widget-insert "`=' refreshes this screen. `s' to search messages. `q' to quit.\n")
\r
125 (let ((fill-column (- (window-width) notmuch-hello-indent)))
\r
126 (center-region start (point))))
\r
128 @@ -601,7 +594,7 @@ Complete list of currently available key bindings:
\r
129 (widget-forward 1)))
\r
131 (unless (widget-at)
\r
132 - (notmuch-hello-goto-search))))
\r
133 + (goto-char search-bar-pos))))
\r
135 (run-hooks 'notmuch-hello-refresh-hook))
\r