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 48A7F431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 15 Sep 2013 01:35:15 -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 zSkmIfZsb7Wi for <notmuch@notmuchmail.org>;
\r
16 Sun, 15 Sep 2013 01:35:10 -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 50D63431FAE
\r
19 for <notmuch@notmuchmail.org>; Sun, 15 Sep 2013 01:35:10 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id B37F11000B2;
\r
22 Sun, 15 Sep 2013 11:35:05 +0300 (EEST)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] contrib: pick: use global keymap
\r
26 In-Reply-To: <1379233068-9626-1-git-send-email-markwalters1009@gmail.com>
\r
27 References: <1379233068-9626-1-git-send-email-markwalters1009@gmail.com>
\r
28 User-Agent: Notmuch/0.16+77~g2561895 (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: Sun, 15 Sep 2013 11:35:05 +0300
\r
34 Message-ID: <m2ob7ua3eu.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sun, 15 Sep 2013 08:35:15 -0000
\r
51 On Sun, Sep 15 2013, Mark Walters <markwalters1009@gmail.com> wrote:
\r
53 > Austin recently introduced a new global keymap. This makes pick use
\r
56 > In most cases pick needs to override this global map because
\r
57 > it wants to close the message pane before doing the action. However,
\r
58 > this documents the over-rides and makes it less likely that the pick
\r
59 > bindings will get out of sync with the main bindings.
\r
66 > contrib/notmuch-pick/notmuch-pick.el | 16 ++++++++++++----
\r
67 > 1 files changed, 12 insertions(+), 4 deletions(-)
\r
69 > diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
\r
70 > index cba9549..01ca4bd 100644
\r
71 > --- a/contrib/notmuch-pick/notmuch-pick.el
\r
72 > +++ b/contrib/notmuch-pick/notmuch-pick.el
\r
73 > @@ -230,6 +230,17 @@ FUNC."
\r
75 > (defvar notmuch-pick-mode-map
\r
76 > (let ((map (make-sparse-keymap)))
\r
77 > + (set-keymap-parent map notmuch-common-keymap)
\r
78 > + ;; The following override the global keymap.
\r
79 > + ;; Override because we want to close message pane first.
\r
80 > + (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))
\r
81 > + ;; Override because we first close message pane and then close pick buffer.
\r
82 > + (define-key map "q" 'notmuch-pick-quit)
\r
83 > + ;; Override because we close message pane after the search query is entered.
\r
84 > + (define-key map "s" 'notmuch-pick-to-search)
\r
85 > + ;; Override because we want to close message pane first.
\r
86 > + (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))
\r
88 > (define-key map [mouse-1] 'notmuch-pick-show-message)
\r
89 > ;; these use notmuch-show functions directly
\r
90 > (define-key map "|" 'notmuch-show-pipe-message)
\r
91 > @@ -244,20 +255,16 @@ FUNC."
\r
92 > (define-key map "e" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))
\r
94 > ;; bindings from show (or elsewhere) but we close the message pane first.
\r
95 > - (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))
\r
96 > (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))
\r
97 > (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))
\r
98 > (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))
\r
99 > (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))
\r
100 > - (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))
\r
102 > ;; The main pick bindings
\r
103 > - (define-key map "q" 'notmuch-pick-quit)
\r
104 > (define-key map "x" 'notmuch-pick-quit)
\r
105 > (define-key map "A" 'notmuch-pick-archive-thread)
\r
106 > (define-key map "a" 'notmuch-pick-archive-message-then-next)
\r
107 > (define-key map "=" 'notmuch-pick-refresh-view)
\r
108 > - (define-key map "s" 'notmuch-pick-to-search)
\r
109 > (define-key map "z" 'notmuch-pick-to-pick)
\r
110 > (define-key map "n" 'notmuch-pick-next-matching-message)
\r
111 > (define-key map "p" 'notmuch-pick-prev-matching-message)
\r
112 > @@ -849,6 +856,7 @@ Complete list of currently available key bindings:
\r
115 > (kill-all-local-variables)
\r
116 > + (setq notmuch-buffer-refresh-function #'notmuch-pick-refresh-view)
\r
117 > (use-local-map notmuch-pick-mode-map)
\r
118 > (setq major-mode 'notmuch-pick-mode
\r
119 > mode-name "notmuch-pick")
\r
123 > _______________________________________________
\r
124 > notmuch mailing list
\r
125 > notmuch@notmuchmail.org
\r
126 > http://notmuchmail.org/mailman/listinfo/notmuch
\r