X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacstips.mdwn;h=8c8e1688c54fcefb33e7851cf6e6065806b0f337;hb=882d2cdc07b55af79c5354fb2562daee22a62b81;hp=fa0810470387b9a5a6effcbe269413c69635e5f0;hpb=280418df96c602eaafdd462eeb90d116f52699fe;p=obsolete%2Fnotmuch-wiki diff --git a/emacstips.mdwn b/emacstips.mdwn index fa08104..8c8e168 100644 --- a/emacstips.mdwn +++ b/emacstips.mdwn @@ -147,6 +147,29 @@ Then, add to `.emacs`: (autoload 'notmuch "~/.emacs.d/my-notmuch" "notmuch mail" t) +## Initial cursor position in notmuch 0.15 hello window + +In notmuch version 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 at 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