From: Servilio Afre Puentes <servilio@gmail.com>
To: notmuch <notmuch@notmuchmail.org>
Subject: [PATCH 1/2] emacs: hello: ask confirmation for clearing recent searches
Date: Fri, 03 May 2013 13:57:12 -0400 [thread overview]
Message-ID: <87vc70kkuf.fsf@goose.CSU.McMaster.CA> (raw)
In-Reply-To: <87y5bwkml2.fsf@goose.CSU.McMaster.CA>
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.
---
emacs/notmuch-hello.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index c1c6f4b..aa063b7 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -599,8 +599,9 @@ Complete list of currently available key bindings:
(widget-insert "Recent searches: ")
(widget-create 'push-button
:notify (lambda (&rest ignore)
- (setq notmuch-search-history nil)
- (notmuch-hello-update))
+ (when (yes-or-no-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)))
--
1.8.2.1
next prev parent reply other threads:[~2013-05-03 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 17:19 [PATCH 0/2] Enhancements to notmuch-hello search history Servilio Afre Puentes
2013-05-03 17:57 ` Servilio Afre Puentes [this message]
2013-05-03 17:58 ` [PATCH 2/2] emacs: hello: allow deleting individual searches in the history Servilio Afre Puentes
2013-05-04 23:31 ` Mark Walters
2013-05-04 8:54 ` [PATCH 0/2] Enhancements to notmuch-hello search history Jani Nikula
2013-05-04 16:12 ` Servilio Afre Puentes
2013-05-05 9:58 ` Tomi Ollila
2013-05-05 12:45 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vc70kkuf.fsf@goose.CSU.McMaster.CA \
--to=servilio@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).