--- /dev/null
+Return-Path: <damien.cassou@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 01329431FC7\r
+ for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:20 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 H7pGzymxmc5A for <notmuch@notmuchmail.org>;\r
+ Fri, 18 Jan 2013 08:04:19 -0800 (PST)\r
+Received: from mail-we0-f174.google.com (mail-we0-f174.google.com\r
+ [74.125.82.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id DC08B431FC9\r
+ for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:15 -0800 (PST)\r
+Received: by mail-we0-f174.google.com with SMTP id x10so927149wey.33\r
+ for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:13 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+ :references; bh=M/GivEDbX31/dubUPZ6r2mJBN+oyTXrUV/ASJLmDQt4=;\r
+ b=cggiB0qKPPnFI4pXmuRJ0wyHC1sfLJ1hWitcV3w/nzr1Fgw26os3bRl0Brcqyfg94q\r
+ MXAOB/jycgTHkpWBgUjC9ZWALPtXodg2RWBbfUAxW2NHn40VoDnA8IQgNCsbO27dch8H\r
+ RiuBDkxP9djTVd1EX1CRg8hNLdPfPAym/YdB65uk/vtpffsl6dw7cceucjgusOgosfis\r
+ FqLzkzJbvrFNTnXRFmZgQyZphK9YoXO+kcoGYQy7TFiBr86d8+z2WdN/oCZgROMHhSzS\r
+ FF1pqbI75mBzBEdxKBfXf3eS3UpiqxkIFhgSayEn66Z4stU6g+PC9aktMM3zKTk/P8vu\r
+ OWXA==\r
+X-Received: by 10.180.88.40 with SMTP id bd8mr4442132wib.33.1358525053367;\r
+ Fri, 18 Jan 2013 08:04:13 -0800 (PST)\r
+Received: from luz3.lille.inria.fr ([193.51.236.44])\r
+ by mx.google.com with ESMTPS id i2sm4073866wiw.3.2013.01.18.08.04.11\r
+ (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
+ Fri, 18 Jan 2013 08:04:12 -0800 (PST)\r
+From: Damien Cassou <damien.cassou@gmail.com>\r
+To: notmuch mailing list <notmuch@notmuchmail.org>\r
+Subject: [PATCH 1/4] emacs: Add notmuch-intersperse to notmuch-lib/\r
+Date: Fri, 18 Jan 2013 17:03:55 +0100\r
+Message-Id: <1358525039-13569-2-git-send-email-damien.cassou@gmail.com>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1358525039-13569-1-git-send-email-damien.cassou@gmail.com>\r
+References: <1358525039-13569-1-git-send-email-damien.cassou@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: Fri, 18 Jan 2013 16:04:20 -0000\r
+\r
+(notmuch-intersperse LIST SEP)\r
+\r
+Return a list with all elements of LIST separated by SEP.\r
+\r
+Signed-off-by: Damien Cassou <damien.cassou@gmail.com>\r
+---\r
+ emacs/notmuch-lib.el | 11 +++++++++--\r
+ 1 file changed, 9 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index d78bcf8..3566126 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -716,8 +716,15 @@ left it."\r
+ ;; Clear out what we've parsed\r
+ (delete-region (point-min) (point))))\r
+ \r
+-\r
+-\r
++(defun notmuch-intersperse (list sep)\r
++ "Return a list with all elements of LIST separated by SEP."\r
++ (let ((first t)\r
++ (res nil))\r
++ (dolist (elt list (nreverse res))\r
++ (unless first\r
++ (push sep res))\r
++ (setq first nil)\r
++ (push elt res))))\r
+ \r
+ (provide 'notmuch-lib)\r
+ \r
+-- \r
+1.7.10.4\r
+\r