1 Return-Path: <jrollins@phys.columbia.edu>
\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 00B3C431FBC
\r
6 for <notmuch@notmuchmail.org>; Mon, 28 Dec 2009 16:30:35 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id cunruAUgiTjf for <notmuch@notmuchmail.org>;
\r
11 Mon, 28 Dec 2009 16:30:34 -0800 (PST)
\r
12 Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7])
\r
13 by olra.theworths.org (Postfix) with ESMTP id 0DD9B431FAE
\r
14 for <notmuch@notmuchmail.org>; Mon, 28 Dec 2009 16:30:33 -0800 (PST)
\r
15 Received: from servo.finestructure.net (cpe-74-75-106-183.maine.res.rr.com
\r
17 (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)
\r
18 by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nBT0UUcj002007
\r
19 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
20 Mon, 28 Dec 2009 19:30:31 -0500 (EST)
\r
21 Received: from jrollins by servo.finestructure.net with local (Exim 4.71)
\r
22 (envelope-from <jrollins@phys.columbia.edu>)
\r
23 id 1NPPyn-0006Yh-IM; Mon, 28 Dec 2009 19:30:29 -0500
\r
24 Date: Mon, 28 Dec 2009 19:30:29 -0500
\r
25 From: Jameson Graef Rollins <jrollins@phys.columbia.edu>
\r
26 To: Tassilo Horn <tassilo@member.fsf.org>
\r
27 Message-ID: <20091229003029.GA4400@finestructure.net>
\r
28 References: <20091228211812.GA10885@finestructure.net>
\r
29 <87k4w691kd.fsf@thinkpad.tsdh.de>
\r
31 Content-Type: multipart/signed; micalg=pgp-sha256;
\r
32 protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G"
\r
33 Content-Disposition: inline
\r
34 In-Reply-To: <87k4w691kd.fsf@thinkpad.tsdh.de>
\r
35 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
36 X-No-Spam-Score: Local
\r
37 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7
\r
38 Cc: notmuch@notmuchmail.org
\r
39 Subject: Re: [notmuch] modifying emacs keymap
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.12
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Tue, 29 Dec 2009 00:30:35 -0000
\r
56 Content-Type: text/plain; charset=us-ascii
\r
57 Content-Disposition: inline
\r
58 Content-Transfer-Encoding: quoted-printable
\r
60 On Mon, Dec 28, 2009 at 11:27:30PM +0100, Tassilo Horn wrote:
\r
61 > > (add-hook 'notmuch-search-mode
\r
62 > > (define-key notmuch-search-mode-map "A" 'notmuch-show-mark-read-then-=
\r
66 > `notmuch-search-mode' is no hook, and even if it was, you couldn't add
\r
67 > what you like, because that's no function. You would need to define a
\r
68 > function that doesn that or wrap it in a lambda function.
\r
70 Thanks for the response, Tassilo. I should have explained that the
\r
71 command I used above did work in so far as it did make the new key
\r
72 available in the correct mode (notmuch-search-mode), as I could tell
\r
73 through the notmuch-help in the notmuch-search-mode. The command I
\r
74 used above has worked for me in other contexts, as I've found
\r
75 documented in a couple of different place on the net. I'm completely
\r
76 an elisp n00b, though, and I can't claim to understand why it worked.
\r
78 > Anyway, this should do the trick:
\r
80 > (define-key notmuch-search-mode-map "A" 'notmuch-show-mark-read-then-arch=
\r
83 As far as I can tell, this command works the same as the one I used
\r
84 above. It produces identical results.
\r
86 I realize now that the problem is that the
\r
87 notmuch-show-mark-read-then-archive-thread function is meant for
\r
88 notmuch-show-mode (as should have been clear to me via the name) and
\r
89 not for notmuch-search-mode. I manually created a new function for
\r
90 the appropriate mode, and that worked. Below is the code that I used
\r
93 Thanks for the help, and sorry for the spam.
\r
98 (defun notmuch-search-mark-read-then-archive-thread ()
\r
99 "Mark thread as read (remove \"unread\" tag) and then archive (remove \"i=
\r
101 This function advances to the next thread when finished."
\r
103 (notmuch-search-remove-tag "inbox")
\r
104 (notmuch-search-remove-tag "unread")
\r
106 (define-key notmuch-search-mode-map "A" 'notmuch-search-mark-read-then-arch=
\r
110 Content-Type: application/pgp-signature; name="signature.asc"
\r
111 Content-Description: Digital signature
\r
112 Content-Disposition: attachment
\r
114 -----BEGIN PGP SIGNATURE-----
\r
115 Version: GnuPG v1.4.10 (GNU/Linux)
\r
117 iQIcBAEBCAAGBQJLOU2cAAoJEO00zqvie6q8RAIQAI2WPK2OTReXtyDtqXzPIPst
\r
118 78Fo01qy7esJvcTp0KvEtRlHzDubBOkMq7eqs++bSPWUjDuATiItfmCOK66xKACh
\r
119 uFjsfwMxJW90s7Gjwo/UuXaD0vJj5KS0ruaFdV++n35dHNURqPxkIJDnFHSCwRl/
\r
120 X777Yi0daTMHRXMA/C9ixvTgAdLXStKmVQ/Hr9JSUYZQJbmmYXVWZMvtPUc+0BeB
\r
121 oj6nIvikt3F+b5VchJNWQ7AJnSqB1I5SVG3doXN9S9m0sJ0wD8vh5jiWayz65TKG
\r
122 f9tB1Yb/iapXeA8InHNOVKY6WL55v2XiPkG6czeH5UO9y5CP3LwXhpexYLXHKcRp
\r
123 AEZ3SjzDqxajxqp1xwFlJnLbgtgur7MOSZq/aEE/CI2ozNJ0Q4Rspw3kPS+NCshd
\r
124 GcUrxLR/xVNGeRcvoY555NkGHerDTTtnfaHV1TesWNMYvuSAL2TAiqBv11EJvDCh
\r
125 NYfv2II4s9QlJrMmgqjY5/vr5df7BynvFWbBQmaQ3gEZQFYpbCvhNGniWeZoiQRa
\r
126 R8TN2pqhQ/zZNe5RN7eKLFbWkfqZP+oMpOXAt7dTLLi3KIsdZyN0BRyhquwCW/nW
\r
127 VFnkDG64sWrqxGdthVgJ0R0lw/F6Yz6dM1GsH9Ex/uNv8fjqHvQPsYxAKZj9/66S
\r
128 wipi6Cb2OatoBB7ZKAFE
\r
130 -----END PGP SIGNATURE-----
\r
132 --k1lZvvs/B4yU6o8G--
\r