--- /dev/null
+Return-Path: <pieter@praet.org>\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 01E2E41601B\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:33 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[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 VvSucD5MqAo7 for <notmuch@notmuchmail.org>;\r
+ Fri, 24 Feb 2012 14:33:31 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 74DBB415D33 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:30 -0800\r
+ (PST)\r
+Received: by mail-ww0-f45.google.com with SMTP id dt12so2226566wgb.2\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:30 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+ 10.180.78.6 as permitted sender) client-ip=10.180.78.6; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of pieter@praet.org\r
+ designates 10.180.78.6 as permitted sender)\r
+ smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.78.6])\r
+ by 10.180.78.6 with SMTP id x6mr9059792wiw.18.1330122810212 (num_hops =\r
+ 1); Fri, 24 Feb 2012 14:33:30 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.78.6 with SMTP id x6mr7203417wiw.18.1330122810163;\r
+ Fri, 24 Feb 2012 14:33:30 -0800 (PST)\r
+Received: from localhost ([109.131.181.26])\r
+ by mx.google.com with ESMTPS id fw5sm6322722wib.0.2012.02.24.14.33.29\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Fri, 24 Feb 2012 14:33:29 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Bremner <david@tethera.net>,\r
+ Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+Subject: [PATCH v2 5/6] emacs: simplify `notmuch-show-get-messages-ids{,\r
+ -search}'\r
+Date: Fri, 24 Feb 2012 23:30:39 +0100\r
+Message-Id: <1330122640-18895-6-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1330122640-18895-1-git-send-email-pieter@praet.org>\r
+References: <87wr7xqpuf.fsf@rocinante.cs.unb.ca>\r
+ <1330122640-18895-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQnkl5HkH4cNY8FyzGD6qvIaASUz3WPRsQqmpqrT4sq1K5xOpjSmPtanzXFUqXvzrp//iysS\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\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, 24 Feb 2012 22:33:33 -0000\r
+\r
+* emacs/notmuch-show.el\r
+\r
+ (notmuch-show-get-messages-ids):\r
+ If provided with optional arg SEPARATOR, return a string consisting\r
+ of all Message-Id's, separated by SEPARATOR. Also improve original\r
+ docstring wrt default return value.\r
+\r
+ (notmuch-show-get-messages-ids-search):\r
+ Removed, as its functionality is now in `notmuch-show-get-messages-ids'.\r
+\r
+ (notmuch-show-tag-all):\r
+ Call `notmuch-show-get-messages-ids' with SEPARATOR arg instead of\r
+ `notmuch-show-get-messages-ids-search'.\r
+---\r
+ emacs/notmuch-show.el | 18 +++++++++---------\r
+ 1 files changed, 9 insertions(+), 9 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 6adbdc0..05606fc 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1339,17 +1339,17 @@ (defun notmuch-show-get-message-id ()\r
+ "Return the message id of the current message."\r
+ (concat "id:\"" (notmuch-show-get-prop :id) "\""))\r
+ \r
+-(defun notmuch-show-get-messages-ids ()\r
+- "Return all message ids of messages in the current thread."\r
++(defun notmuch-show-get-messages-ids (&optional separator)\r
++ "Return a list of Message-Id's of all messages in the current buffer.\r
++\r
++If provided with optional argument SEPARATOR, return a string\r
++instead, consisting of all Message-Id's separated by SEPARATOR."\r
+ (let ((message-ids))\r
+ (notmuch-show-mapc\r
+ (lambda () (push (notmuch-show-get-message-id) message-ids)))\r
+- message-ids))\r
+-\r
+-(defun notmuch-show-get-messages-ids-search ()\r
+- "Return a search string for all message ids of messages in the\r
+-current thread."\r
+- (mapconcat 'identity (notmuch-show-get-messages-ids) " or "))\r
++ (if separator\r
++ (mapconcat 'identity message-ids separator)\r
++ message-ids)))\r
+ \r
+ ;; dme: Would it make sense to use a macro for many of these?\r
+ \r
+@@ -1638,7 +1638,7 @@ (defun notmuch-show-tag-all (&rest tag-changes)\r
+ \r
+ TAG-CHANGES is a list of tag operations for `notmuch-tag'."\r
+ (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id))\r
+- (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes)\r
++ (apply 'notmuch-tag (notmuch-show-get-messages-ids " or ") tag-changes)\r
+ (notmuch-show-mapc\r
+ (lambda ()\r
+ (let* ((current-tags (notmuch-show-get-tags))\r
+-- \r
+1.7.8.1\r
+\r