[PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

Jani Nikula jani at nikula.org
Thu Jan 26 06:13:40 PST 2012


On Thu, 26 Jan 2012 14:48:44 +0100, Pieter Praet <pieter at praet.org> wrote:
> On Tue, 17 Jan 2012 23:22:30 +0200, Jani Nikula <jani at nikula.org> 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.


More information about the notmuch mailing list