[PATCH 1/4] test: add `notmuch-hello-mode-hook-counter'
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sat, 17 Dec 2011 04:20:16 +0000 (08:20 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:57 +0000 (09:40 -0800)
d3/02980026096e59b119fcbc3b0e026694af46d7 [new file with mode: 0644]

diff --git a/d3/02980026096e59b119fcbc3b0e026694af46d7 b/d3/02980026096e59b119fcbc3b0e026694af46d7
new file mode 100644 (file)
index 0000000..23bc31f
--- /dev/null
@@ -0,0 +1,84 @@
+Return-Path: <dmitry.kurochkin@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 3DFFB429E29\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:07 -0800 (PST)\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 EfwoiWlS-5rX for <notmuch@notmuchmail.org>;\r
+       Fri, 16 Dec 2011 20:21:03 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id BC731431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:02 -0800 (PST)\r
+Received: by werm12 with SMTP id m12so970080wer.26\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:00 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:date:message-id:x-mailer;\r
+       bh=kAfaFXBGmQvo7DhqZz4e2QpcrTfWPLTo19/vxnpDuFM=;\r
+       b=s4rHpphFXO8C9WHN3ysjcQqLW6EOsFuxCavTJpvdOcfgoz1/pNQ7yROcsXXxEauwNx\r
+       VjUUhdkPzxZPgkLSoj5XzZgDyYadsmpMImP7UQ4ag++glPs75SA6bDgngUrP0emZ5jzC\r
+       wG8FBScC6z7v6n8JqO5xqYuUke8n/3lVzEre4=\r
+Received: by 10.216.136.155 with SMTP id w27mr5209141wei.8.1324095660076;\r
+       Fri, 16 Dec 2011 20:21:00 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id fo3sm15812711wib.11.2011.12.16.20.20.58\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Fri, 16 Dec 2011 20:20:59 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/4] test: add `notmuch-hello-mode-hook-counter'\r
+Date: Sat, 17 Dec 2011 08:20:16 +0400\r
+Message-Id: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.7.3\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: Sat, 17 Dec 2011 04:21:07 -0000\r
+\r
+Add `notmuch-hello-mode-hook-counter' hook to count how many times\r
+`notmuch-hello-mode-hook' was called.  The counter function increments\r
+`notmuch-hello-mode-hook-counter' variable value if it is bount,\r
+otherwise it does nothing.\r
+---\r
+ test/test-lib.el |    9 +++++++++\r
+ 1 files changed, 9 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/test-lib.el b/test/test-lib.el\r
+index 97ae593..3bca138 100644\r
+--- a/test/test-lib.el\r
++++ b/test/test-lib.el\r
+@@ -61,3 +61,12 @@ running, quit if it terminated."\r
+   (if (not (process-attributes pid))\r
+       (kill-emacs)\r
+     (run-at-time "1 min" nil 'orphan-watchdog pid)))\r
++\r
++(defun notmuch-hello-mode-hook-counter ()\r
++  "Count how many times `notmuch-hello-mode-hook' is called.\r
++Increments `notmuch-hello-mode-hook-counter' variable value if it\r
++is bound, otherwise does nothing."\r
++  (if (boundp 'notmuch-hello-mode-hook-counter)\r
++      (setq notmuch-hello-mode-hook-counter\r
++          (1+ notmuch-hello-mode-hook-counter))))\r
++(add-hook 'notmuch-hello-mode-hook 'notmuch-hello-mode-hook-counter)\r
+-- \r
+1.7.7.3\r
+\r