[PATCH v4 1/3] Emacs: Display a message when generating address completion candidates
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 19 Sep 2014 18:16:40 +0000 (20:16 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:35 +0000 (10:04 -0800)
a6/2907fb45cd3ab3d4203eb5b88b026d61834f22 [new file with mode: 0644]

diff --git a/a6/2907fb45cd3ab3d4203eb5b88b026d61834f22 b/a6/2907fb45cd3ab3d4203eb5b88b026d61834f22
new file mode 100644 (file)
index 0000000..b9a3866
--- /dev/null
@@ -0,0 +1,80 @@
+Return-Path: <sojkam1@fel.cvut.cz>\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 2C727431FC0\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Sep 2014 11:17:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 AcmK8vUbAhno for <notmuch@notmuchmail.org>;\r
+       Fri, 19 Sep 2014 11:17:03 -0700 (PDT)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 77E6D431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Sep 2014 11:17:03 -0700 (PDT)\r
+Received: from localhost (unknown [192.168.200.7])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 6808B19F33C7;\r
+       Fri, 19 Sep 2014 20:17:02 +0200 (CEST)\r
+X-Virus-Scanned: IMAP STYX AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id tHPHEYGtyDYm; Fri, 19 Sep 2014 20:16:57 +0200 (CEST)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id C695D19F33EA;\r
+       Fri, 19 Sep 2014 20:16:56 +0200 (CEST)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.84)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1XV2jn-0005i2-Ub; Fri, 19 Sep 2014 20:16:55 +0200\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 1/3] Emacs: Display a message when generating address\r
+       completion candidates\r
+Date: Fri, 19 Sep 2014 20:16:40 +0200\r
+Message-Id: <1411150602-21892-2-git-send-email-sojkam1@fel.cvut.cz>\r
+X-Mailer: git-send-email 2.1.0\r
+In-Reply-To: <1411150602-21892-1-git-send-email-sojkam1@fel.cvut.cz>\r
+References: <1411150602-21892-1-git-send-email-sojkam1@fel.cvut.cz>\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, 19 Sep 2014 18:17:07 -0000\r
+\r
+The TAB-initiated address completion generates completion candidates\r
+synchronously, blocking the UI. Since this can take long time, it is\r
+better to let the use know what's happening.\r
+---\r
+ emacs/notmuch-address.el | 3 ++-\r
+ 1 file changed, 2 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+index fa65cd5..fde3c1b 100644\r
+--- a/emacs/notmuch-address.el\r
++++ b/emacs/notmuch-address.el\r
+@@ -70,7 +70,8 @@ to know how address selection is made by default."\r
+               (point)))\r
+        (orig (buffer-substring-no-properties beg end))\r
+        (completion-ignore-case t)\r
+-       (options (notmuch-address-options orig))\r
++       (options (with-temp-message "Looking for completion candidates..."\r
++                  (notmuch-address-options orig)))\r
+        (num-options (length options))\r
+        (chosen (cond\r
+                 ((eq num-options 0)\r
+-- \r
+2.1.0\r
+\r