[PATCH v2 1/2] emacs: hello: ask confirmation for clearing recent searches
authorServilio Afre Puentes <servilio@gmail.com>
Fri, 7 Jun 2013 20:55:57 +0000 (16:55 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:27 +0000 (09:55 -0800)
5b/f145c218a5e1efce2b8a52095b2873c8d238aa [new file with mode: 0644]

diff --git a/5b/f145c218a5e1efce2b8a52095b2873c8d238aa b/5b/f145c218a5e1efce2b8a52095b2873c8d238aa
new file mode 100644 (file)
index 0000000..fa61ab2
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <servilio@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 731D1431FAF\r
+       for <notmuch@notmuchmail.org>; Fri,  7 Jun 2013 14:04:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id dVjkghV6Hk2q for <notmuch@notmuchmail.org>;\r
+       Fri,  7 Jun 2013 14:04:11 -0700 (PDT)\r
+Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com\r
+       [209.85.214.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E4DAF431FAE\r
+       for <notmuch@notmuchmail.org>; Fri,  7 Jun 2013 14:04:10 -0700 (PDT)\r
+Received: by mail-ob0-f180.google.com with SMTP id eh20so7059916obb.25\r
+       for <notmuch@notmuchmail.org>; Fri, 07 Jun 2013 14:04:10 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       bh=7O47EGbFt2J2wn5HVCCwIn8mZxs+nNJP5l9xftfWbcg=;\r
+       b=ZG+qVaK4OsLzAH2CyIiDQm/3m7Zv42hn0rcx5vENyFs0iUDcNRNGS0/FAhoSJ+BhrS\r
+       FwQv/ktlsGwfYCFNouWfwtYrgSEJSG1zePbQEokusITtgamL2cwJJFrTbZDJvWjdHWSD\r
+       mmC9+j3fV2dlVmQ/Dokx/M2t1B49IQ64jMsgqc4ZGANmu0fBPvqT+PMFgIwgvJxuXhY0\r
+       8Mw+eV2vGkbIggq0FpStcNoiIfdZQWySo2YX8/9NsH8tJpGVRhwrM2k8sCnO9YCaJIHc\r
+       Oz/u4A3nERbpKXxtVNeIZRRdNPSshRJ1hbCukOuGvc0ClINsPxM1ULJODDDP35xSRwIi\r
+       iBIw==\r
+X-Received: by 10.60.125.5 with SMTP id mm5mr320544oeb.81.1370639050442;\r
+       Fri, 07 Jun 2013 14:04:10 -0700 (PDT)\r
+Received: from localhost (fammed-mip89.CSU.McMaster.CA. [130.113.164.106])\r
+       by mx.google.com with ESMTPSA id jt9sm692939obc.0.2013.06.07.14.04.09\r
+       for <notmuch@notmuchmail.org>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 07 Jun 2013 14:04:09 -0700 (PDT)\r
+From: Servilio Afre Puentes <servilio@gmail.com>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2 1/2] emacs: hello: ask confirmation for clearing recent\r
+       searches\r
+In-Reply-To: <87sj0t7idi.fsf@goose.CSU.McMaster.CA>\r
+References: <87sj0t7idi.fsf@goose.CSU.McMaster.CA>\r
+User-Agent: Notmuch/0.15.2+10~gf347fe6 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 07 Jun 2013 16:55:57 -0400\r
+Message-ID: <87ppvx7i8y.fsf@goose.CSU.McMaster.CA>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 07 Jun 2013 21:04:18 -0000\r
+\r
+\r
+The button to clear the recent searches in notmuch-hello is easy to\r
+press accidentally while moving around the, clearing potentially\r
+useful searches with no way of recovering them.\r
+---\r
+ emacs/notmuch-hello.el | 5 +++--\r
+ 1 file changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index c1c6f4b..1ad1bea 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -599,8 +599,9 @@ Complete list of currently available key bindings:\r
+     (widget-insert "Recent searches: ")\r
+     (widget-create 'push-button\r
+                  :notify (lambda (&rest ignore)\r
+-                           (setq notmuch-search-history nil)\r
+-                           (notmuch-hello-update))\r
++                           (when (y-or-n-p "Are you sure you want to clear the searches? ")\r
++                             (setq notmuch-search-history nil)\r
++                             (notmuch-hello-update)))\r
+                  "clear")\r
+     (widget-insert "\n\n")\r
+     (let ((start (point)))\r
+-- \r
+1.8.3\r
+\r