From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 41795429E25 for ; Tue, 20 Dec 2011 16:21:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eJh08DWYw-xB for ; Tue, 20 Dec 2011 16:21:52 -0800 (PST) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id 94C3C431FB6 for ; Tue, 20 Dec 2011 16:21:52 -0800 (PST) Received: from odin.local (nancy.schnouki.net [78.238.0.45]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id 44C8C6A0026; Wed, 21 Dec 2011 01:21:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1324426910; bh=MF+JmPIRDzzaJzOG0nIxg5X+wKTZZFdikc1l9l1XLy0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=W2hO45Zo6INRWufSxa7LLGvK6y0TO2tDfc8udqKzQBH51ibasjCv42vS7J33YuSbC l4mBjQHMwFBffm8GVgJFK4lvUumXoAh8RDKUQ+C8NagN1oW7el/W+1Rhkpen+pYFqq FJ3eCsT9rdkWGbqcH/lED0LYxP8zulN0Yv3QD/3U= From: Thomas Jost To: Dmitry Kurochkin Subject: [PATCH] emacs: add notmuch-hello-refresh-hook Date: Wed, 21 Dec 2011 01:21:18 +0100 Message-Id: <1324426878-14148-1-git-send-email-schnouki@schnouki.net> X-Mailer: git-send-email 1.7.8 In-Reply-To: <877h1ws6r7.fsf@gmail.com> References: <877h1ws6r7.fsf@gmail.com> Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 00:21:53 -0000 This hook is called every time a notmuch-hello buffer is updated. --- Hi Dmitry, I like the idea of having a -mode-hook and a -refresh-hook :) Thanks for your suggestions! Regards, Thomas emacs/notmuch-hello.el | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 115f80a..9fa3137 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -143,6 +143,11 @@ Typically \",\" in the US and UK and \".\" or \" \" in Europe." :group 'notmuch :type 'hook) +(defcustom notmuch-hello-refresh-hook nil + "Functions called after updating a `notmuch-hello' buffer." + :type 'hook + :group notmuch) + (defvar notmuch-hello-url "http://notmuchmail.org" "The `notmuch' web site.") @@ -590,7 +595,9 @@ Complete list of currently available key bindings: (widget-forward 1))) (unless (widget-at) - (notmuch-hello-goto-search))))) + (notmuch-hello-goto-search)))) + + (run-hooks 'notmuch-hello-refresh-hook)) (defun notmuch-folder () "Deprecated function for invoking notmuch---calling `notmuch' is preferred now." -- 1.7.8