From: Tomi Ollila Date: Sun, 20 Jan 2013 03:59:22 +0000 (+0200) Subject: emacstips: initial cursor position in 0.15 notmuch hello window X-Git-Url: https://git.cworth.org/git?p=obsolete%2Fnotmuch-wiki;a=commitdiff_plain;h=6b83c8c9e5e7643f9445eab1504ae60456fad897 emacstips: initial cursor position in 0.15 notmuch hello window --- 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