Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3CDD5431FAF for ; Thu, 26 Jan 2012 06:13:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nhp2V59NToW9 for ; Thu, 26 Jan 2012 06:13:45 -0800 (PST) Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A2B61431FAE for ; Thu, 26 Jan 2012 06:13:45 -0800 (PST) Received: by qabg24 with SMTP id g24so592903qab.5 for ; Thu, 26 Jan 2012 06:13:45 -0800 (PST) Received: by 10.224.177.203 with SMTP id bj11mr2789330qab.37.1327587224985; Thu, 26 Jan 2012 06:13:44 -0800 (PST) Received: from localhost (nikula.org. [92.243.24.172]) by mx.google.com with ESMTPS id g17sm8770909qad.3.2012.01.26.06.13.42 (version=SSLv3 cipher=OTHER); Thu, 26 Jan 2012 06:13:43 -0800 (PST) From: Jani Nikula To: Pieter Praet , Dmitry Kurochkin , notmuch@notmuchmail.org Subject: Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer In-Reply-To: <87zkdavakj.fsf@praet.org> References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com> <874nvukort.fsf@nikula.org> <87zkdavakj.fsf@praet.org> User-Agent: Notmuch/0.10.2+187~g43d4f26 (http://notmuchmail.org) Emacs/23.1.1 (i686-pc-linux-gnu) Date: Thu, 26 Jan 2012 14:13:40 +0000 Message-ID: <87k44eimaz.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2012 14:13:46 -0000 On Thu, 26 Jan 2012 14:48:44 +0100, Pieter Praet wrote: > On Tue, 17 Jan 2012 23:22:30 +0200, Jani Nikula wrote: > > [...] > > > > After this, what would the user have to do to bind some key to put the > > point in the search box? If someone wants to restore old behaviour for > > themselves. > > > > This should work: > > #+begin_src emacs-lisp > (add-hook 'notmuch-hello-mode-hook > (lambda () > (local-set-key (kbd "s") > (lambda() (interactive) > (re-search-forward "Search: "))))) > #+end_src Thanks for the basic idea, iterated into: (define-key notmuch-hello-mode-map "S" (lambda() (interactive) (goto-char (point-min)) (re-search-forward "Search: "))) BR, Jani.