[PATCH 4/5] Add notmuch-hook. Called when notmuch is started, before notmuch-hello...
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 1 Jul 2010 16:08:26 +0000 (20:08 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:10 +0000 (09:37 -0800)
1d/39c2dad08f9cfd7f0768002aca40cac14c631a [new file with mode: 0644]

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