From 6b83c8c9e5e7643f9445eab1504ae60456fad897 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 20 Jan 2013 05:59:22 +0200 Subject: [PATCH] emacstips: initial cursor position in 0.15 notmuch hello window --- emacstips.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/emacstips.mdwn b/emacstips.mdwn index fa08104..5eef0f9 100644 --- a/emacstips.mdwn +++ b/emacstips.mdwn @@ -147,6 +147,28 @@ Then, add to `.emacs`: (autoload 'notmuch "~/.emacs.d/my-notmuch" "notmuch mail" t) +## 0.15: Initial cursor position in notmuch hello window + +In notmuch 0.15 emacs client the handling of cursor position in notmuch hello +window has been simplified to a version which suits best most cases. + +Initially the cursor is positioned in the beginning of buffer. + +Some users liked the "ancient" version where cursor was moved to the +first `Saved searches` button. + +Add the following code to your notmuch emacs configuration file in +case you want this behaviour: + + (add-hook 'notmuch-hello-refresh-hook + (lambda () + (if (and (eq (point) (point-min)) + (search-forward "Saved searches:" nil t)) + (progn + (forward-line) + (widget-forward 1)) + (if (eq (widget-type (widget-at)) 'editable-field) + (beginning-of-line))))) ## Add a key binding to add/remove/toggle a tag -- 2.43.0