1 Return-Path: <tomi.ollila@nixu.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 70B5C431FD0
\r
6 for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 02:27:09 -0800 (PST)
\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 EyssO7D3Iz6q for <notmuch@notmuchmail.org>;
\r
16 Tue, 20 Dec 2011 02:27:08 -0800 (PST)
\r
17 Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 6BBCF431FB6
\r
21 for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 02:27:08 -0800 (PST)
\r
22 Received: from pps.filterd (mail-gw3 [127.0.0.1])
\r
23 by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBKAIOoI000533;
\r
24 Tue, 20 Dec 2011 12:27:05 +0200
\r
25 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
26 by mail-gw3.nixu.fi with ESMTP id 114cs0uhvd-1
\r
27 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
28 Tue, 20 Dec 2011 12:27:03 +0200
\r
29 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
30 by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
\r
31 pBKAR2QM017236; Tue, 20 Dec 2011 12:27:03 +0200
\r
32 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
33 To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org
\r
34 Subject: Re: [PATCH v2] emacs: Add `notmuch-jump-to-recent-buffer'.
\r
35 In-Reply-To: <1324368106-24802-1-git-send-email-dme@dme.org>
\r
36 References: <1324368106-24802-1-git-send-email-dme@dme.org>
\r
37 User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1
\r
39 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
40 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
41 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
42 Date: Tue, 20 Dec 2011 12:27:02 +0200
\r
43 Message-ID: <yf6y5u7zgg9.fsf@taco2.nixu.fi>
\r
45 Content-Type: text/plain; charset=us-ascii
\r
46 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,
\r
47 1.0.211, 0.0.0000 definitions=2011-12-20_02:2011-12-20, 2011-12-20,
\r
48 1970-01-01 signatures=0
\r
49 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
\r
50 ipscore=0 suspectscore=0
\r
51 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0
\r
53 scancount=1 engine=6.0.2-1012030000 definitions=main-1112200033
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Tue, 20 Dec 2011 10:27:09 -0000
\r
68 On Tue, 20 Dec 2011 08:01:46 +0000, David Edmondson <dme@dme.org> wrote:
\r
69 > >From a Carl Worth idea: add a function which will select the most
\r
70 > recently used notmuch buffer (search, show or hello). If no recent
\r
71 > buffer is found, run `notmuch'.
\r
73 > It is expected that the user will global bind this command to a key
\r
77 Thanks Aaron & David for the explanations. I was finally able to test
\r
78 and byte compile the function separately (as a learning experiment).
\r
82 I'd like to know how users are going to use this :)
\r
86 > emacs/notmuch.el | 17 +++++++++++++++++
\r
87 > 1 files changed, 17 insertions(+), 0 deletions(-)
\r
89 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
90 > index 2e9973e..da61aa9 100644
\r
91 > --- a/emacs/notmuch.el
\r
92 > +++ b/emacs/notmuch.el
\r
93 > @@ -1055,6 +1055,23 @@ current search results AND that are tagged with the given tag."
\r
98 > +(defun notmuch-jump-to-recent-buffer ()
\r
99 > + "Jump to the most recent notmuch buffer (search, show or hello).
\r
101 > +If no recent buffer is found, run `notmuch'."
\r
104 > + (loop for buffer in (buffer-list)
\r
105 > + if (with-current-buffer buffer
\r
106 > + (memq major-mode '(notmuch-show-mode
\r
107 > + notmuch-search-mode
\r
108 > + notmuch-hello-mode)))
\r
109 > + return buffer)))
\r
111 > + (switch-to-buffer last)
\r
114 > (setq mail-user-agent 'notmuch-user-agent)
\r
116 > (provide 'notmuch)
\r