mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
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.
This commit is contained in:
parent
f2f6da9af0
commit
3ac2727dae
1 changed files with 5 additions and 6 deletions
|
@ -272,9 +272,10 @@ diagonal."
|
||||||
(customize-variable 'notmuch-hello-saved-searches))
|
(customize-variable 'notmuch-hello-saved-searches))
|
||||||
"edit")
|
"edit")
|
||||||
(widget-insert "\n\n")
|
(widget-insert "\n\n")
|
||||||
|
(setq final-target-pos (point-marker))
|
||||||
(let ((start (point)))
|
(let ((start (point)))
|
||||||
(setq found-target-pos (notmuch-hello-insert-tags saved-alist widest target))
|
(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))
|
(setq final-target-pos found-target-pos))
|
||||||
(indent-rigidly start (point) notmuch-hello-indent)))
|
(indent-rigidly start (point) notmuch-hello-indent)))
|
||||||
|
|
||||||
|
@ -365,11 +366,9 @@ diagonal."
|
||||||
|
|
||||||
(widget-setup)
|
(widget-setup)
|
||||||
|
|
||||||
(if final-target-pos
|
|
||||||
(goto-char final-target-pos)
|
(goto-char final-target-pos)
|
||||||
(progn
|
(if (not (widget-at))
|
||||||
(goto-char (point-min))
|
(widget-forward 1))))
|
||||||
(widget-forward 1)))))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue