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 40C0C40B945 for ; Thu, 1 Jul 2010 09:09:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham 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 HK5EWBPBKgBd for ; Thu, 1 Jul 2010 09:09:18 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) by olra.theworths.org (Postfix) with ESMTP id F350740B943 for ; Thu, 1 Jul 2010 09:09:04 -0700 (PDT) Received: by mail-fx0-f53.google.com with SMTP id 19so1776530fxm.26 for ; Thu, 01 Jul 2010 09:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=mAh2xpvKiFyTcRSLX/Q57UZwUIAdxUIbOSCa9XNmyVo=; b=cPuacOYQeVltMuVvQLGhQqK6eVvm3fUs3b7E9kiCgiZ39kXspp8StTketa3iqQ38Da 3z2kVIwBenHM5cHDcwGEA1HaHes4jNxAFwLz71C/Hd/FpvtSsKsziDZRm2z79RWF/w6z AAI2dt+ygfjdN0AD+PkGPBKJt9tXfeLx+upyQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=NOdleRjjeMg9BpNtkCZfFM8m87HOZ2Wpe59V9dbLJgfo+CBVOrsrgipynGyi75wat0 msOTjDlMLJvKOfkbeo77qQ1jHdb8LBJ1daUmB4H53FBoBMHhK8iJ96RqwLC60QUPCqrT YMoTZ27nvRVVJsMiUhCkfO0fXXE7CHzRhCYic= Received: by 10.223.116.134 with SMTP id m6mr7836989faq.61.1278000544492; Thu, 01 Jul 2010 09:09:04 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id o11sm53488633fal.43.2010.07.01.09.09.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 09:09:03 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 4/5] Add notmuch-hook. Called when notmuch is started, before notmuch-hello buffer is created. Date: Thu, 1 Jul 2010 20:08:26 +0400 Message-Id: <1278000507-22290-5-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Thu, 01 Jul 2010 16:09:30 -0000 --- emacs/notmuch.el | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 5ab3df7..4900a27 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -185,6 +185,11 @@ For a mouse binding, return nil." (set-buffer-modified-p nil) (view-buffer (current-buffer) 'kill-buffer-if-not-modified)))) +(defcustom notmuch-hook nil + "Functions to call when notmuch is started, before `notmuch-hello' buffer is created." + :group 'notmuch + :type 'hook) + (defcustom notmuch-search-hook '(hl-line-mode) "List of functions to call when notmuch displays the search results." :type 'hook @@ -895,6 +900,7 @@ current search results AND that are tagged with the given tag." (defun notmuch () "Run notmuch and display saved searches, known tags, etc." (interactive) + (run-hooks 'notmuch-hook) (notmuch-hello)) (setq mail-user-agent 'notmuch-user-agent) -- 1.7.1