--- /dev/null
+Return-Path: <too@guru-group.fi>\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 B75D8431FCB\r
+ for <notmuch@notmuchmail.org>; Mon, 2 Sep 2013 12:37:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 2gRLT0pZwEUs for <notmuch@notmuchmail.org>;\r
+ Mon, 2 Sep 2013 12:37:29 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6AC54431FC7\r
+ for <notmuch@notmuchmail.org>; Mon, 2 Sep 2013 12:37:29 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id A6DA7100063; Mon, 2 Sep 2013 22:37:17 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: target notmuch-one.el[c] -- emacs client in one .el[c]\r
+ file\r
+Date: Mon, 2 Sep 2013 22:37:16 +0300\r
+Message-Id: <1378150636-26822-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+Cc: tomi.ollila@iki.fi\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: Mon, 02 Sep 2013 19:37:35 -0000\r
+\r
+Added Makefile recipes to create notmuch emacs client in just one\r
+.el[c] file.\r
+\r
+This is an experimental feature and not built by default.\r
+\r
+This is useful for example when one wants to build the latest\r
+emacs client and then distribute the elisp file to many machines.\r
+\r
+This is also useful for (initial) testing:\r
+\r
+ make emacs/notmuch-one.elc\r
+ emacs -q -l emacs/notmuch-one.elc -f notmuch\r
+\r
+can be used to quickly experiment with new development.\r
+---\r
+\r
+I've used one-file notmuch.elc since Fri Nov 4 11:03:33 2011 +0200\r
+when I created perl script to combine all .el files together\r
+and had only minor problems (if any, cannot be sure).\r
+\r
+I build notmuch.elc in one machine and then distribute it to 2\r
+others.\r
+\r
+Now with the .eldeps target Austin created the same can be done\r
+by utilizing the dependency information it provied.\r
+\r
+Now I build notmuch using something like the following sequence:\r
+\r
+ ./configure --without-emacs\r
+ make\r
+ make install\r
+ make emacs/notmuch-one.elc\r
+ cp emacs/notmuch-one.elc ~/local/elisp-ext/notmuch.elc\r
+\r
+... but most often I do last 2 of the above and then continue with:\r
+\r
+ scp ~/local/elisp-ext/notmuch.elc host2:local/elisp-ext\r
+ scp ~/local/elisp-ext/notmuch.elc host3:local/elisp-ext\r
+\r
+ emacs/Makefile.local | 14 ++++++++++++++\r
+ 1 file changed, 14 insertions(+)\r
+\r
+diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
+index a910aff..9e3d409 100644\r
+--- a/emacs/Makefile.local\r
++++ b/emacs/Makefile.local\r
+@@ -46,6 +46,20 @@ endif\r
+ install: install-emacs\r
+ endif\r
+ \r
++# Unsupported hack to provide notmuch emacs client in one *.elc file.\r
++# It probably works -- or then it fails mysteriously. YMMV.\r
++# Enter `make emacs/notmuch-one.elc' in top level directory to build it.\r
++ifeq ($(HAVE_EMACS),1)\r
++$(dir)/notmuch-one.el: $(emacs_sources)\r
++ rm -f $(emacs_bytecode) # XXX\r
++ make -n all WITH_EMACS=1 | sed -n '/printf.*EMACS/ s/.* //p' | \\r
++ xargs grep -vh '(declare-function.*"notmuch' > '$@' || :\r
++ { echo ';; Local Variables:'; \\r
++ echo ';; byte-compile-warnings: (not cl-functions)'; \\r
++ echo ';; End:'; } >> '$@'\r
++endif\r
++CLEAN+=$(dir)/notmuch-one.el $(dir)/notmuch-one.elc\r
++\r
+ .PHONY: install-emacs\r
+ install-emacs:\r
+ mkdir -p "$(DESTDIR)$(emacslispdir)"\r
+-- \r
+1.8.0\r
+\r