From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/4] test: add `notmuch-hello-mode-hook-counter'
Date: Sat, 17 Dec 2011 08:20:16 +0400 [thread overview]
Message-ID: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com> (raw)
Add `notmuch-hello-mode-hook-counter' hook to count how many times
`notmuch-hello-mode-hook' was called. The counter function increments
`notmuch-hello-mode-hook-counter' variable value if it is bount,
otherwise it does nothing.
---
test/test-lib.el | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/test/test-lib.el b/test/test-lib.el
index 97ae593..3bca138 100644
--- a/test/test-lib.el
+++ b/test/test-lib.el
@@ -61,3 +61,12 @@ running, quit if it terminated."
(if (not (process-attributes pid))
(kill-emacs)
(run-at-time "1 min" nil 'orphan-watchdog pid)))
+
+(defun notmuch-hello-mode-hook-counter ()
+ "Count how many times `notmuch-hello-mode-hook' is called.
+Increments `notmuch-hello-mode-hook-counter' variable value if it
+is bound, otherwise does nothing."
+ (if (boundp 'notmuch-hello-mode-hook-counter)
+ (setq notmuch-hello-mode-hook-counter
+ (1+ notmuch-hello-mode-hook-counter))))
+(add-hook 'notmuch-hello-mode-hook 'notmuch-hello-mode-hook-counter)
--
1.7.7.3
next reply other threads:[~2011-12-17 4:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-17 4:20 Dmitry Kurochkin [this message]
2011-12-17 4:20 ` [PATCH 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17 4:20 ` [PATCH 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17 4:20 ` [PATCH 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-17 20:16 ` [PATCH v2 0/4] " Dmitry Kurochkin
2011-12-17 20:16 ` [PATCH v2 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-17 20:16 ` [PATCH v2 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17 20:16 ` [PATCH v2 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17 20:17 ` [PATCH v2 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 0/4] " Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-18 0:16 ` Austin Clements
2011-12-18 0:21 ` [PATCH v4 0/4] " Dmitry Kurochkin
2011-12-18 0:21 ` [PATCH v4 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-18 0:21 ` [PATCH v4 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-18 0:21 ` [PATCH v4 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-18 0:21 ` [PATCH v4 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-18 0:32 ` [PATCH v4 0/4] " Austin Clements
2011-12-20 11:47 ` David Bremner
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=1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com \
--to=dmitry.kurochkin@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).