1 Return-Path: <andrew.burgess@embecosm.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 arlo.cworth.org (Postfix) with ESMTP id 527E06DE02CE
\r
6 for <notmuch@notmuchmail.org>; Sun, 13 Dec 2015 11:09:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.668 tagged_above=-999 required=5 tests=[AWL=0.052,
\r
12 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,
\r
13 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id buBqO9UrCsb2 for <notmuch@notmuchmail.org>;
\r
17 Sun, 13 Dec 2015 11:09:51 -0800 (PST)
\r
18 Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com
\r
19 [74.125.82.52]) by arlo.cworth.org (Postfix) with ESMTPS id 885406DE0231 for
\r
20 <notmuch@notmuchmail.org>; Sun, 13 Dec 2015 11:09:50 -0800 (PST)
\r
21 Received: by mail-wm0-f52.google.com with SMTP id n186so18751779wmn.0
\r
22 for <notmuch@notmuchmail.org>; Sun, 13 Dec 2015 11:09:50 -0800 (PST)
\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
24 d=embecosm-com.20150623.gappssmtp.com; s=20150623;
\r
25 h=date:from:to:cc:subject:message-id:references:mime-version
\r
26 :content-type:content-disposition:in-reply-to:user-agent;
\r
27 bh=gDMLVVlPt6KuoNCZMsgKeBfrmMyVNcZQeqEd/1bU744=;
\r
28 b=hAYWRl1pEnHQN6KOVLPcSj+eJqB8SSGiDdztCtiN0jeQ6V2zdnIVqBarUqdIKYAIvP
\r
29 dvvuP7lkUzWDTY2u2XV5j4pelGD3GmJsUJ/+qJB2fiYdeNV2qS3ot4Zc+qzUpmLcNPK8
\r
30 HdtyoTI7bNUjbvY7Gs6ehNicKKOScLm4GXIDeRyjpx4QqTCPp9rKPc62PNp1jYiQrPE2
\r
31 q9ASjTUZ8X1fl/Azs1OsxRjw9Byw8KViO/h/4lU7OovMLdLMTQMgh1uhfjJ3P1Ak6R57
\r
32 e1zfkLe2D3auKUOyi7Bbbz6FBZ0c1BFGrRvn8Tp0q1BYHWJ3CFiQI3r1GojQa7LqknSb
\r
34 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
35 d=1e100.net; s=20130820;
\r
36 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
\r
37 :mime-version:content-type:content-disposition:in-reply-to
\r
39 bh=gDMLVVlPt6KuoNCZMsgKeBfrmMyVNcZQeqEd/1bU744=;
\r
40 b=IBrYmMlKcxGSfTz50eohekwpFuyQ3EoSjFV1q638uH7C8KsgW76Aszz95/8wq7G4Z+
\r
41 JyK7fvuVmfAfzcA6feeiqfmMC4YbKLt1yLiWpSVcHdOvNmCSjO5OCPjA8r9OpI4hSk+7
\r
42 ha2mytOBSTBBqxpNEABP3geniHOauth6iPZQOJxhQMfcLky0v9QLVb3r7amQTNzugGdM
\r
43 jpOlVk6N3JLsaZuqGp2jXXt/DtSx3V2uVGnZbOlil+UBI2xSCbOK7tFfK5VrIrTRNAY6
\r
44 t5ODb/lkAueN5iTZGtPQGvv/6x1m2uySSK0HMGLGheSKp6ARrcAIsU6h7uUezG/eoOkA
\r
46 X-Gm-Message-State: ALoCoQkEWmDbUbbmbAa8rI7hiGWY3TMT3BhiPhPdLd+i9kcaG8tm+8TU1flTbmkTvT5w3NbPRWFV0G14wQCsW89Bz2CZErYPgA==
\r
47 X-Received: by 10.28.64.131 with SMTP id n125mr20117708wma.103.1450033788732;
\r
48 Sun, 13 Dec 2015 11:09:48 -0800 (PST)
\r
49 Received: from localhost (host86-138-95-213.range86-138.btcentralplus.com.
\r
51 by smtp.gmail.com with ESMTPSA id t64sm12712583wmf.23.2015.12.13.11.09.47
\r
52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
53 Sun, 13 Dec 2015 11:09:48 -0800 (PST)
\r
54 Date: Sun, 13 Dec 2015 19:09:46 +0000
\r
55 From: Andrew Burgess <andrew.burgess@embecosm.com>
\r
56 To: Jani Nikula <jani@nikula.org>
\r
57 Cc: notmuch@notmuchmail.org
\r
58 Subject: Re: [PATCH] emacs: hello: display jump key next to saved search when
\r
60 Message-ID: <20151213190946.GA4520@embecosm.com>
\r
61 References: <1450031043-24038-1-git-send-email-jani@nikula.org>
\r
63 Content-Type: text/plain; charset=us-ascii
\r
64 Content-Disposition: inline
\r
65 In-Reply-To: <1450031043-24038-1-git-send-email-jani@nikula.org>
\r
66 X-Operating-System: Linux/4.2.6-201.fc22.x86_64 (x86_64)
\r
67 X-Uptime: 19:06:44 up 1 day, 22:02,
\r
68 X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ]
\r
69 User-Agent: Mutt/1.5.24 (2015-08-30)
\r
70 X-BeenThere: notmuch@notmuchmail.org
\r
71 X-Mailman-Version: 2.1.20
\r
73 List-Id: "Use and development of the notmuch mail system."
\r
74 <notmuch.notmuchmail.org>
\r
75 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
77 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
78 List-Post: <mailto:notmuch@notmuchmail.org>
\r
79 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
80 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
81 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
82 X-List-Received-Date: Sun, 13 Dec 2015 19:09:53 -0000
\r
84 * Jani Nikula <jani@nikula.org> [2015-12-13 20:24:03 +0200]:
\r
86 > Display the shortcut jump key next to the saved search name in notmuch
\r
87 > hello, if one is defined for the saved search.
\r
91 > This is probably something with infinite bikeshedding
\r
92 > potential. Therefore I just quickly hacked something together as a
\r
93 > proof of concept. This displays the jump keys like this:
\r
97 > Maybe the space between "j" and the key is unnecessary? Maybe the "j"
\r
98 > itself is unnecessary? Maybe the brackets are unnecessary? Maybe it
\r
99 > could use some color? Does displaying these need to be customizable?
\r
102 > emacs/notmuch-hello.el | 8 ++++++--
\r
103 > 1 file changed, 6 insertions(+), 2 deletions(-)
\r
105 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
106 > index 738baad23b20..3c5440331669 100644
\r
107 > --- a/emacs/notmuch-hello.el
\r
108 > +++ b/emacs/notmuch-hello.el
\r
109 > @@ -578,7 +578,9 @@ with `notmuch-hello-query-counts'."
\r
111 > (otherwise notmuch-search-oldest-first)))
\r
112 > (search-type (eq (plist-get elem :search-type) 'tree))
\r
113 > - (msg-count (plist-get elem :count)))
\r
114 > + (msg-count (plist-get elem :count))
\r
115 > + (key (plist-get elem :key))
\r
116 > + (shortcut (if key (format " [j %s]" key) nil)))
\r
118 You should probably make use of `substitute-command-key' instead of
\r
119 hard-coding the "j", something like (untested):
\r
121 (format (substitute-command-key " [\[notmuch-jump-search] %s]") key)
\r