summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-04-26 18:40:04 -0700
committerCarl Worth <cworth@cworth.org>2010-04-26 18:54:08 -0700
commit3ac2727dae9a703324982cdb2ac243f195c8c958 (patch)
tree6951dd5bd79e865e53863d1c0d32b1bac7bd6935 /emacs
parentf2f6da9af09541d5e15d39d165d5185dcdb47d5b (diff)
emacs: notmuch-hello: Move to first saved search item.
This give us a useful active widget by default, ("inbox"), and otherwise gives the first saved search in the user's customized list. Not having point on the search bar means that the various keybindings are all available.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-hello.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 61e85bb..24e3133 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -272,9 +272,10 @@ diagonal."
(customize-variable 'notmuch-hello-saved-searches))
"edit")
(widget-insert "\n\n")
+ (setq final-target-pos (point-marker))
(let ((start (point)))
(setq found-target-pos (notmuch-hello-insert-tags saved-alist widest target))
- (if (not final-target-pos)
+ (if found-target-pos
(setq final-target-pos found-target-pos))
(indent-rigidly start (point) notmuch-hello-indent)))
@@ -365,11 +366,9 @@ diagonal."
(widget-setup)
- (if final-target-pos
- (goto-char final-target-pos)
- (progn
- (goto-char (point-min))
- (widget-forward 1)))))
+ (goto-char final-target-pos)
+ (if (not (widget-at))
+ (widget-forward 1))))
;;