The button to clear the recent searches in notmuch-hello is easy to
press accidentally while moving around the, clearing potentially
useful searches with no way of recovering them.
(widget-insert "Recent searches: ")
(widget-create 'push-button
:notify (lambda (&rest ignore)
(widget-insert "Recent searches: ")
(widget-create 'push-button
:notify (lambda (&rest ignore)
- (setq notmuch-search-history nil)
- (notmuch-hello-update))
+ (when (y-or-n-p "Are you sure you want to clear the searches? ")
+ (setq notmuch-search-history nil)
+ (notmuch-hello-update)))
"clear")
(widget-insert "\n\n")
(let ((start (point)))
"clear")
(widget-insert "\n\n")
(let ((start (point)))